thermal_hwmon.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * thermal_hwmon.h - Generic Thermal Management hwmon support.
  3. *
  4. * Code based on Intel thermal_core.c. Copyrights of the original code:
  5. * Copyright (C) 2008 Intel Corp
  6. * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com>
  7. * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com>
  8. *
  9. * Copyright (C) 2013 Texas Instruments
  10. * Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com>
  11. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; version 2 of the License.
  16. *
  17. * This program is distributed in the hope that it will be useful, but
  18. * WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  20. * General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License along
  23. * with this program; if not, write to the Free Software Foundation, Inc.,
  24. * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  25. *
  26. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  27. */
  28. #ifndef __THERMAL_HWMON_H__
  29. #define __THERMAL_HWMON_H__
  30. #include <linux/thermal.h>
  31. #ifdef CONFIG_THERMAL_HWMON
  32. int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
  33. void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
  34. #else
  35. static int
  36. thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
  37. {
  38. return 0;
  39. }
  40. static void
  41. thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
  42. {
  43. }
  44. #endif
  45. #endif /* __THERMAL_HWMON_H__ */