Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  *  thermal_hwmon.h - Generic Thermal Management hwmon support.
0004  *
0005  *  Code based on Intel thermal_core.c. Copyrights of the original code:
0006  *  Copyright (C) 2008 Intel Corp
0007  *  Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com>
0008  *  Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com>
0009  *
0010  *  Copyright (C) 2013 Texas Instruments
0011  *  Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com>
0012  */
0013 #ifndef __THERMAL_HWMON_H__
0014 #define __THERMAL_HWMON_H__
0015 
0016 #include <linux/thermal.h>
0017 
0018 #ifdef CONFIG_THERMAL_HWMON
0019 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
0020 int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
0021 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
0022 #else
0023 static inline int
0024 thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
0025 {
0026     return 0;
0027 }
0028 
0029 static inline int
0030 devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
0031 {
0032     return 0;
0033 }
0034 
0035 static inline void
0036 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
0037 {
0038 }
0039 #endif
0040 
0041 #endif /* __THERMAL_HWMON_H__ */