blob: 1a9d65f6a6a8b1bdb15a6a9e19880cbc099417ed [file] [log] [blame]
Lina Iyer7e3c0382018-05-07 11:52:29 -06001/* SPDX-License-Identifier: GPL-2.0 */
Eduardo Valentin0dd88792013-07-03 15:14:28 -04002/*
3 * thermal_hwmon.h - Generic Thermal Management hwmon support.
4 *
5 * Code based on Intel thermal_core.c. Copyrights of the original code:
6 * Copyright (C) 2008 Intel Corp
7 * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com>
8 * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com>
9 *
10 * Copyright (C) 2013 Texas Instruments
11 * Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com>
Eduardo Valentin0dd88792013-07-03 15:14:28 -040012 */
13#ifndef __THERMAL_HWMON_H__
14#define __THERMAL_HWMON_H__
15
16#include <linux/thermal.h>
17
18#ifdef CONFIG_THERMAL_HWMON
19int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
Andrey Smirnovc7fc4032019-12-10 08:41:52 -080020int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
Eduardo Valentin0dd88792013-07-03 15:14:28 -040021void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
22#else
Eduardo Valentin03334ba2019-01-02 00:34:03 +000023static inline int
Eduardo Valentin0dd88792013-07-03 15:14:28 -040024thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
25{
26 return 0;
27}
28
Andrey Smirnovc7fc4032019-12-10 08:41:52 -080029static inline int
30devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
31{
32 return 0;
33}
34
Eduardo Valentin03334ba2019-01-02 00:34:03 +000035static inline void
Eduardo Valentin0dd88792013-07-03 15:14:28 -040036thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
37{
38}
39#endif
40
41#endif /* __THERMAL_HWMON_H__ */