mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-23 18:01:07 +03:00
tegra: hwpm: add wrapper for log functions
In an effort to make HWPM driver OS agnostic, add wrapper for log functions. Jira THWPM-59 Change-Id: I27ba6fac4c4f87c113c3d2cf8c62214bf4db1329 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2740404 Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Vasuki Shankar <vasukis@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
ae38729467
commit
8f3cb60584
@@ -14,7 +14,21 @@
|
||||
#ifndef TEGRA_HWPM_LOG_H
|
||||
#define TEGRA_HWPM_LOG_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/bits.h>
|
||||
#include <os/linux/log.h>
|
||||
#else
|
||||
void tegra_hwpm_err_impl(struct tegra_soc_hwpm *hwpm,
|
||||
const char *func, int line, const char *fmt, ...)
|
||||
{
|
||||
return;
|
||||
}
|
||||
void tegra_hwpm_dbg_impl(struct tegra_soc_hwpm *hwpm,
|
||||
u32 dbg_mask, const char *func, int line, const char *fmt, ...)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define TEGRA_SOC_HWPM_MODULE_NAME "tegra-soc-hwpm"
|
||||
|
||||
@@ -69,11 +83,4 @@ enum tegra_soc_hwpm_log_type {
|
||||
#define tegra_hwpm_fn(hwpm, fmt, arg...) \
|
||||
tegra_hwpm_dbg_impl(hwpm, hwpm_fn, __func__, __LINE__, fmt, ##arg)
|
||||
|
||||
struct tegra_soc_hwpm;
|
||||
|
||||
void tegra_hwpm_err_impl(struct tegra_soc_hwpm *hwpm,
|
||||
const char *func, int line, const char *fmt, ...);
|
||||
void tegra_hwpm_dbg_impl(struct tegra_soc_hwpm *hwpm,
|
||||
u32 dbg_mask, const char *func, int line, const char *fmt, ...);
|
||||
|
||||
#endif /* TEGRA_HWPM_LOG_H */
|
||||
|
||||
24
os/linux/log.h
Normal file
24
os/linux/log.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#ifndef TEGRA_HWPM_OS_LINUX_LOG_H
|
||||
#define TEGRA_HWPM_OS_LINUX_LOG_H
|
||||
|
||||
struct tegra_soc_hwpm;
|
||||
|
||||
void tegra_hwpm_err_impl(struct tegra_soc_hwpm *hwpm,
|
||||
const char *func, int line, const char *fmt, ...);
|
||||
void tegra_hwpm_dbg_impl(struct tegra_soc_hwpm *hwpm,
|
||||
u32 dbg_mask, const char *func, int line, const char *fmt, ...);
|
||||
|
||||
#endif /* TEGRA_HWPM_OS_LINUX_LOG_H */
|
||||
Reference in New Issue
Block a user