da9211.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * da9211.h - Regulator device driver for DA9211/DA9212
  3. * /DA9213/DA9223/DA9214/DA9224/DA9215/DA9225
  4. * Copyright (C) 2015 Dialog Semiconductor Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version 2
  9. * of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #ifndef __LINUX_REGULATOR_DA9211_H
  17. #define __LINUX_REGULATOR_DA9211_H
  18. #include <linux/regulator/machine.h>
  19. #define DA9211_MAX_REGULATORS 2
  20. struct gpio_desc;
  21. enum da9211_chip_id {
  22. DA9211,
  23. DA9212,
  24. DA9213,
  25. DA9223,
  26. DA9214,
  27. DA9224,
  28. DA9215,
  29. DA9225,
  30. };
  31. struct da9211_pdata {
  32. /*
  33. * Number of buck
  34. * 1 : 4 phase 1 buck
  35. * 2 : 2 phase 2 buck
  36. */
  37. int num_buck;
  38. struct gpio_desc *gpiod_ren[DA9211_MAX_REGULATORS];
  39. struct device_node *reg_node[DA9211_MAX_REGULATORS];
  40. struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
  41. };
  42. #endif