max8660.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * max8660.h -- Voltage regulation for the Maxim 8660/8661
  3. *
  4. * Copyright (C) 2009 Wolfram Sang, Pengutronix e.K.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; version 2 of the License.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. */
  19. #ifndef __LINUX_REGULATOR_MAX8660_H
  20. #define __LINUX_REGULATOR_MAX8660_H
  21. #include <linux/regulator/machine.h>
  22. enum {
  23. MAX8660_V3,
  24. MAX8660_V4,
  25. MAX8660_V5,
  26. MAX8660_V6,
  27. MAX8660_V7,
  28. MAX8660_V_END,
  29. };
  30. /**
  31. * max8660_subdev_data - regulator subdev data
  32. * @id: regulator id
  33. * @name: regulator name
  34. * @platform_data: regulator init data
  35. */
  36. struct max8660_subdev_data {
  37. int id;
  38. const char *name;
  39. struct regulator_init_data *platform_data;
  40. };
  41. /**
  42. * max8660_platform_data - platform data for max8660
  43. * @num_subdevs: number of regulators used
  44. * @subdevs: pointer to regulators used
  45. * @en34_is_high: if EN34 is driven high, regulators cannot be en-/disabled.
  46. */
  47. struct max8660_platform_data {
  48. int num_subdevs;
  49. struct max8660_subdev_data *subdevs;
  50. unsigned en34_is_high:1;
  51. };
  52. #endif