dbx500-prcmu.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2010
  3. *
  4. * Author: Bengt Jonsson <bengt.jonsson@stericsson.com> for ST-Ericsson,
  5. * Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson
  6. *
  7. * License Terms: GNU General Public License v2
  8. *
  9. */
  10. #ifndef DBX500_REGULATOR_H
  11. #define DBX500_REGULATOR_H
  12. #include <linux/platform_device.h>
  13. /**
  14. * struct dbx500_regulator_info - dbx500 regulator information
  15. * @dev: device pointer
  16. * @desc: regulator description
  17. * @rdev: regulator device pointer
  18. * @is_enabled: status of the regulator
  19. * @epod_id: id for EPOD (power domain)
  20. * @is_ramret: RAM retention switch for EPOD (power domain)
  21. * @operating_point: operating point (only for vape, to be removed)
  22. *
  23. */
  24. struct dbx500_regulator_info {
  25. struct device *dev;
  26. struct regulator_desc desc;
  27. struct regulator_dev *rdev;
  28. bool is_enabled;
  29. u16 epod_id;
  30. bool is_ramret;
  31. bool exclude_from_power_state;
  32. unsigned int operating_point;
  33. };
  34. void power_state_active_enable(void);
  35. int power_state_active_disable(void);
  36. #ifdef CONFIG_REGULATOR_DEBUG
  37. int ux500_regulator_debug_init(struct platform_device *pdev,
  38. struct dbx500_regulator_info *regulator_info,
  39. int num_regulators);
  40. int ux500_regulator_debug_exit(void);
  41. #else
  42. static inline int ux500_regulator_debug_init(struct platform_device *pdev,
  43. struct dbx500_regulator_info *regulator_info,
  44. int num_regulators)
  45. {
  46. return 0;
  47. }
  48. static inline int ux500_regulator_debug_exit(void)
  49. {
  50. return 0;
  51. }
  52. #endif
  53. #endif