internal.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * internal.h -- Voltage/Current Regulator framework internal code
  3. *
  4. * Copyright 2007, 2008 Wolfson Microelectronics PLC.
  5. * Copyright 2008 SlimLogic Ltd.
  6. *
  7. * Author: Liam Girdwood <[email protected]>
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the
  11. * Free Software Foundation; either version 2 of the License, or (at your
  12. * option) any later version.
  13. *
  14. */
  15. #ifndef __REGULATOR_INTERNAL_H
  16. #define __REGULATOR_INTERNAL_H
  17. /*
  18. * struct regulator
  19. *
  20. * One for each consumer device.
  21. */
  22. struct regulator {
  23. struct device *dev;
  24. struct list_head list;
  25. unsigned int always_on:1;
  26. unsigned int bypass:1;
  27. int uA_load;
  28. int min_uV;
  29. int max_uV;
  30. int enabled;
  31. char *supply_name;
  32. struct device_attribute dev_attr;
  33. struct regulator_dev *rdev;
  34. struct dentry *debugfs;
  35. };
  36. #ifdef CONFIG_OF
  37. struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
  38. const struct regulator_desc *desc,
  39. struct regulator_config *config,
  40. struct device_node **node);
  41. #else
  42. static inline struct regulator_init_data *
  43. regulator_of_get_init_data(struct device *dev,
  44. const struct regulator_desc *desc,
  45. struct regulator_config *config,
  46. struct device_node **node)
  47. {
  48. return NULL;
  49. }
  50. #endif
  51. #endif