da9211.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * da9211.h - Regulator device driver for DA9211/DA9212
  3. * /DA9213/DA9214/DA9215
  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. enum da9211_chip_id {
  21. DA9211,
  22. DA9212,
  23. DA9213,
  24. DA9214,
  25. DA9215,
  26. };
  27. struct da9211_pdata {
  28. /*
  29. * Number of buck
  30. * 1 : 4 phase 1 buck
  31. * 2 : 2 phase 2 buck
  32. */
  33. int num_buck;
  34. int gpio_ren[DA9211_MAX_REGULATORS];
  35. struct device_node *reg_node[DA9211_MAX_REGULATORS];
  36. struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
  37. };
  38. #endif