17e3c0381SLina Iyer /* SPDX-License-Identifier: GPL-2.0 */ 20dd88793SEduardo Valentin /* 30dd88793SEduardo Valentin * thermal_hwmon.h - Generic Thermal Management hwmon support. 40dd88793SEduardo Valentin * 50dd88793SEduardo Valentin * Code based on Intel thermal_core.c. Copyrights of the original code: 60dd88793SEduardo Valentin * Copyright (C) 2008 Intel Corp 70dd88793SEduardo Valentin * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> 80dd88793SEduardo Valentin * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> 90dd88793SEduardo Valentin * 100dd88793SEduardo Valentin * Copyright (C) 2013 Texas Instruments 110dd88793SEduardo Valentin * Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com> 120dd88793SEduardo Valentin */ 130dd88793SEduardo Valentin #ifndef __THERMAL_HWMON_H__ 140dd88793SEduardo Valentin #define __THERMAL_HWMON_H__ 150dd88793SEduardo Valentin 160dd88793SEduardo Valentin #include <linux/thermal.h> 170dd88793SEduardo Valentin 180dd88793SEduardo Valentin #ifdef CONFIG_THERMAL_HWMON 190dd88793SEduardo Valentin int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz); 20*4a16c190SDaniel Lezcano int devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz); 210dd88793SEduardo Valentin void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz); 220dd88793SEduardo Valentin #else 2303334ba8SEduardo Valentin static inline int thermal_add_hwmon_sysfs(struct thermal_zone_device * tz)240dd88793SEduardo Valentinthermal_add_hwmon_sysfs(struct thermal_zone_device *tz) 250dd88793SEduardo Valentin { 260dd88793SEduardo Valentin return 0; 270dd88793SEduardo Valentin } 280dd88793SEduardo Valentin 29c7fc403eSAndrey Smirnov static inline int devm_thermal_add_hwmon_sysfs(struct device * dev,struct thermal_zone_device * tz)30*4a16c190SDaniel Lezcanodevm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz) 31c7fc403eSAndrey Smirnov { 32c7fc403eSAndrey Smirnov return 0; 33c7fc403eSAndrey Smirnov } 34c7fc403eSAndrey Smirnov 3503334ba8SEduardo Valentin static inline void thermal_remove_hwmon_sysfs(struct thermal_zone_device * tz)360dd88793SEduardo Valentinthermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) 370dd88793SEduardo Valentin { 380dd88793SEduardo Valentin } 390dd88793SEduardo Valentin #endif 400dd88793SEduardo Valentin 410dd88793SEduardo Valentin #endif /* __THERMAL_HWMON_H__ */ 42