1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * thermal_hwmon.h - Generic Thermal Management hwmon support. 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Code based on Intel thermal_core.c. Copyrights of the original code: 6*4882a593Smuzhiyun * Copyright (C) 2008 Intel Corp 7*4882a593Smuzhiyun * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> 8*4882a593Smuzhiyun * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * Copyright (C) 2013 Texas Instruments 11*4882a593Smuzhiyun * Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com> 12*4882a593Smuzhiyun */ 13*4882a593Smuzhiyun #ifndef __THERMAL_HWMON_H__ 14*4882a593Smuzhiyun #define __THERMAL_HWMON_H__ 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun #include <linux/thermal.h> 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #ifdef CONFIG_THERMAL_HWMON 19*4882a593Smuzhiyun int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz); 20*4882a593Smuzhiyun int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz); 21*4882a593Smuzhiyun void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz); 22*4882a593Smuzhiyun #else 23*4882a593Smuzhiyun static inline int thermal_add_hwmon_sysfs(struct thermal_zone_device * tz)24*4882a593Smuzhiyunthermal_add_hwmon_sysfs(struct thermal_zone_device *tz) 25*4882a593Smuzhiyun { 26*4882a593Smuzhiyun return 0; 27*4882a593Smuzhiyun } 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun static inline int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device * tz)30*4882a593Smuzhiyundevm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) 31*4882a593Smuzhiyun { 32*4882a593Smuzhiyun return 0; 33*4882a593Smuzhiyun } 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun static inline void thermal_remove_hwmon_sysfs(struct thermal_zone_device * tz)36*4882a593Smuzhiyunthermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) 37*4882a593Smuzhiyun { 38*4882a593Smuzhiyun } 39*4882a593Smuzhiyun #endif 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun #endif /* __THERMAL_HWMON_H__ */ 42