xref: /openbmc/linux/drivers/thermal/thermal_hwmon.h (revision 03334ba8b425b2ad275c8f390cf83c7b081c3095)
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);
200dd88793SEduardo Valentin void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
210dd88793SEduardo Valentin #else
22*03334ba8SEduardo Valentin static inline int
230dd88793SEduardo Valentin thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
240dd88793SEduardo Valentin {
250dd88793SEduardo Valentin 	return 0;
260dd88793SEduardo Valentin }
270dd88793SEduardo Valentin 
28*03334ba8SEduardo Valentin static inline void
290dd88793SEduardo Valentin thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
300dd88793SEduardo Valentin {
310dd88793SEduardo Valentin }
320dd88793SEduardo Valentin #endif
330dd88793SEduardo Valentin 
340dd88793SEduardo Valentin #endif /* __THERMAL_HWMON_H__ */
35