exynos4_tmu.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * exynos4_tmu.h - Samsung EXYNOS4 TMU (Thermal Management Unit)
  3. *
  4. * Copyright (C) 2011 Samsung Electronics
  5. * Donggeun Kim <dg77.kim@samsung.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. #ifndef _LINUX_EXYNOS4_TMU_H
  22. #define _LINUX_EXYNOS4_TMU_H
  23. enum calibration_type {
  24. TYPE_ONE_POINT_TRIMMING,
  25. TYPE_TWO_POINT_TRIMMING,
  26. TYPE_NONE,
  27. };
  28. /**
  29. * struct exynos4_tmu_platform_data
  30. * @threshold: basic temperature for generating interrupt
  31. * 25 <= threshold <= 125 [unit: degree Celsius]
  32. * @trigger_levels: array for each interrupt levels
  33. * [unit: degree Celsius]
  34. * 0: temperature for trigger_level0 interrupt
  35. * condition for trigger_level0 interrupt:
  36. * current temperature > threshold + trigger_levels[0]
  37. * 1: temperature for trigger_level1 interrupt
  38. * condition for trigger_level1 interrupt:
  39. * current temperature > threshold + trigger_levels[1]
  40. * 2: temperature for trigger_level2 interrupt
  41. * condition for trigger_level2 interrupt:
  42. * current temperature > threshold + trigger_levels[2]
  43. * 3: temperature for trigger_level3 interrupt
  44. * condition for trigger_level3 interrupt:
  45. * current temperature > threshold + trigger_levels[3]
  46. * @trigger_level0_en:
  47. * 1 = enable trigger_level0 interrupt,
  48. * 0 = disable trigger_level0 interrupt
  49. * @trigger_level1_en:
  50. * 1 = enable trigger_level1 interrupt,
  51. * 0 = disable trigger_level1 interrupt
  52. * @trigger_level2_en:
  53. * 1 = enable trigger_level2 interrupt,
  54. * 0 = disable trigger_level2 interrupt
  55. * @trigger_level3_en:
  56. * 1 = enable trigger_level3 interrupt,
  57. * 0 = disable trigger_level3 interrupt
  58. * @gain: gain of amplifier in the positive-TC generator block
  59. * 0 <= gain <= 15
  60. * @reference_voltage: reference voltage of amplifier
  61. * in the positive-TC generator block
  62. * 0 <= reference_voltage <= 31
  63. * @cal_type: calibration type for temperature
  64. *
  65. * This structure is required for configuration of exynos4_tmu driver.
  66. */
  67. struct exynos4_tmu_platform_data {
  68. u8 threshold;
  69. u8 trigger_levels[4];
  70. bool trigger_level0_en;
  71. bool trigger_level1_en;
  72. bool trigger_level2_en;
  73. bool trigger_level3_en;
  74. u8 gain;
  75. u8 reference_voltage;
  76. enum calibration_type cal_type;
  77. };
  78. #endif /* _LINUX_EXYNOS4_TMU_H */