pdata.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Copyright (C) 2012 Dialog Semiconductor Ltd.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation; either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. */
  9. #ifndef __DA9055_PDATA_H
  10. #define __DA9055_PDATA_H
  11. #define DA9055_MAX_REGULATORS 8
  12. struct da9055;
  13. enum gpio_select {
  14. NO_GPIO = 0,
  15. GPIO_1,
  16. GPIO_2
  17. };
  18. struct da9055_pdata {
  19. int (*init) (struct da9055 *da9055);
  20. int irq_base;
  21. int gpio_base;
  22. struct regulator_init_data *regulators[DA9055_MAX_REGULATORS];
  23. /* Enable RTC in RESET Mode */
  24. bool reset_enable;
  25. /*
  26. * GPI muxed pin to control
  27. * regulator state A/B, 0 if not available.
  28. */
  29. int *gpio_ren;
  30. /*
  31. * GPI muxed pin to control
  32. * regulator set, 0 if not available.
  33. */
  34. int *gpio_rsel;
  35. /*
  36. * Regulator mode control bits value (GPI offset) that
  37. * that controls the regulator state, 0 if not available.
  38. */
  39. enum gpio_select *reg_ren;
  40. /*
  41. * Regulator mode control bits value (GPI offset) that
  42. * controls the regulator set A/B, 0 if not available.
  43. */
  44. enum gpio_select *reg_rsel;
  45. /* GPIOs to enable regulator, 0 if not available */
  46. int *ena_gpio;
  47. };
  48. #endif /* __DA9055_PDATA_H */