tmu.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  3. * http://www.samsung.com
  4. * Akshay Saraswat <akshay.s@samsung.com>
  5. *
  6. * Thermal Management Unit
  7. *
  8. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License version 2 as
  13. * published by the Free Software Foundation.
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. */
  19. #ifndef _TMU_H
  20. #define _TMU_H
  21. enum tmu_status_t {
  22. TMU_STATUS_INIT = -1,
  23. TMU_STATUS_NORMAL = 0,
  24. TMU_STATUS_WARNING,
  25. TMU_STATUS_TRIPPED,
  26. };
  27. /*
  28. * Monitors status of the TMU device and exynos temperature
  29. *
  30. * @param temp pointer to the current temperature value
  31. * @return enum tmu_status_t value, code indicating event to execute
  32. * and -1 on error
  33. */
  34. enum tmu_status_t tmu_monitor(int *temp);
  35. /*
  36. * Initialize TMU device
  37. *
  38. * @param blob FDT blob
  39. * @return int value, 0 for success
  40. */
  41. int tmu_init(const void *blob);
  42. #endif /* _THERMAL_H_ */