internal.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 <lrg@slimlogic.co.uk>
  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. char *supply_name;
  31. struct device_attribute dev_attr;
  32. struct regulator_dev *rdev;
  33. struct dentry *debugfs;
  34. };
  35. #ifdef CONFIG_OF
  36. struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
  37. const struct regulator_desc *desc,
  38. struct device_node **node);
  39. #else
  40. static inline struct regulator_init_data *
  41. regulator_of_get_init_data(struct device *dev,
  42. const struct regulator_desc *desc,
  43. struct device_node **node)
  44. {
  45. return NULL;
  46. }
  47. #endif
  48. #endif