max8660.h 966 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * max8660.h -- Voltage regulation for the Maxim 8660/8661
  4. *
  5. * Copyright (C) 2009 Wolfram Sang, Pengutronix e.K.
  6. */
  7. #ifndef __LINUX_REGULATOR_MAX8660_H
  8. #define __LINUX_REGULATOR_MAX8660_H
  9. #include <linux/regulator/machine.h>
  10. enum {
  11. MAX8660_V3,
  12. MAX8660_V4,
  13. MAX8660_V5,
  14. MAX8660_V6,
  15. MAX8660_V7,
  16. MAX8660_V_END,
  17. };
  18. /**
  19. * max8660_subdev_data - regulator subdev data
  20. * @id: regulator id
  21. * @name: regulator name
  22. * @platform_data: regulator init data
  23. */
  24. struct max8660_subdev_data {
  25. int id;
  26. const char *name;
  27. struct regulator_init_data *platform_data;
  28. };
  29. /**
  30. * max8660_platform_data - platform data for max8660
  31. * @num_subdevs: number of regulators used
  32. * @subdevs: pointer to regulators used
  33. * @en34_is_high: if EN34 is driven high, regulators cannot be en-/disabled.
  34. */
  35. struct max8660_platform_data {
  36. int num_subdevs;
  37. struct max8660_subdev_data *subdevs;
  38. unsigned en34_is_high:1;
  39. };
  40. #endif