dbx500-prcmu.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. *
  22. */
  23. struct dbx500_regulator_info {
  24. struct device *dev;
  25. struct regulator_desc desc;
  26. struct regulator_dev *rdev;
  27. bool is_enabled;
  28. u16 epod_id;
  29. bool is_ramret;
  30. bool exclude_from_power_state;
  31. };
  32. void power_state_active_enable(void);
  33. int power_state_active_disable(void);
  34. #ifdef CONFIG_REGULATOR_DEBUG
  35. int ux500_regulator_debug_init(struct platform_device *pdev,
  36. struct dbx500_regulator_info *regulator_info,
  37. int num_regulators);
  38. int ux500_regulator_debug_exit(void);
  39. #else
  40. static inline int ux500_regulator_debug_init(struct platform_device *pdev,
  41. struct dbx500_regulator_info *regulator_info,
  42. int num_regulators)
  43. {
  44. return 0;
  45. }
  46. static inline int ux500_regulator_debug_exit(void)
  47. {
  48. return 0;
  49. }
  50. #endif
  51. #endif