thermal_hwmon.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  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>
  12. */
  13. #ifndef __THERMAL_HWMON_H__
  14. #define __THERMAL_HWMON_H__
  15. #include <linux/thermal.h>
  16. #ifdef CONFIG_THERMAL_HWMON
  17. int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
  18. int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
  19. void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
  20. #else
  21. static inline int
  22. thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
  23. {
  24. return 0;
  25. }
  26. static inline int
  27. devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
  28. {
  29. return 0;
  30. }
  31. static inline void
  32. thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
  33. {
  34. }
  35. #endif
  36. #endif /* __THERMAL_HWMON_H__ */