msm_thermal.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 and
  6. * only version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef __MSM_THERMAL_H
  14. #define __MSM_THERMAL_H
  15. struct msm_thermal_data {
  16. uint32_t sensor_id;
  17. uint32_t poll_ms;
  18. int32_t limit_temp_degC;
  19. int32_t temp_hysteresis_degC;
  20. uint32_t bootup_freq_step;
  21. uint32_t bootup_freq_control_mask;
  22. int32_t core_limit_temp_degC;
  23. int32_t core_temp_hysteresis_degC;
  24. int32_t hotplug_temp_degC;
  25. int32_t hotplug_temp_hysteresis_degC;
  26. uint32_t core_control_mask;
  27. uint32_t freq_mitig_temp_degc;
  28. uint32_t freq_mitig_temp_hysteresis_degc;
  29. uint32_t freq_mitig_control_mask;
  30. uint32_t freq_limit;
  31. int32_t vdd_rstr_temp_degC;
  32. int32_t vdd_rstr_temp_hyst_degC;
  33. int32_t psm_temp_degC;
  34. int32_t psm_temp_hyst_degC;
  35. int32_t ocr_temp_degC;
  36. int32_t ocr_temp_hyst_degC;
  37. int32_t therm_reset_temp_degC;
  38. };
  39. #ifdef CONFIG_THERMAL_MONITOR
  40. extern int msm_thermal_init(struct msm_thermal_data *pdata);
  41. extern int msm_thermal_device_init(void);
  42. extern int msm_thermal_set_frequency(uint32_t cpu, uint32_t freq,
  43. bool is_max);
  44. #else
  45. static inline int msm_thermal_init(struct msm_thermal_data *pdata)
  46. {
  47. return -ENOSYS;
  48. }
  49. static inline int msm_thermal_device_init(void)
  50. {
  51. return -ENOSYS;
  52. }
  53. static inline int msm_thermal_set_frequency(uint32_t cpu, uint32_t freq,
  54. bool is_max)
  55. {
  56. return -ENOSYS;
  57. }
  58. #endif
  59. #endif /*__MSM_THERMAL_H*/