act8865.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * act8865.h -- Voltage regulation for active-semi act88xx PMUs
  3. *
  4. * Copyright (C) 2013 Atmel Corporation.
  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. #ifndef __LINUX_REGULATOR_ACT8865_H
  16. #define __LINUX_REGULATOR_ACT8865_H
  17. #include <linux/regulator/machine.h>
  18. enum {
  19. ACT8600_ID_DCDC1,
  20. ACT8600_ID_DCDC2,
  21. ACT8600_ID_DCDC3,
  22. ACT8600_ID_SUDCDC4,
  23. ACT8600_ID_LDO5,
  24. ACT8600_ID_LDO6,
  25. ACT8600_ID_LDO7,
  26. ACT8600_ID_LDO8,
  27. ACT8600_ID_LDO9,
  28. ACT8600_ID_LDO10,
  29. };
  30. enum {
  31. ACT8865_ID_DCDC1,
  32. ACT8865_ID_DCDC2,
  33. ACT8865_ID_DCDC3,
  34. ACT8865_ID_LDO1,
  35. ACT8865_ID_LDO2,
  36. ACT8865_ID_LDO3,
  37. ACT8865_ID_LDO4,
  38. ACT8865_REG_NUM,
  39. };
  40. enum {
  41. ACT8846_ID_REG1,
  42. ACT8846_ID_REG2,
  43. ACT8846_ID_REG3,
  44. ACT8846_ID_REG4,
  45. ACT8846_ID_REG5,
  46. ACT8846_ID_REG6,
  47. ACT8846_ID_REG7,
  48. ACT8846_ID_REG8,
  49. ACT8846_ID_REG9,
  50. ACT8846_ID_REG10,
  51. ACT8846_ID_REG11,
  52. ACT8846_ID_REG12,
  53. ACT8846_REG_NUM,
  54. };
  55. enum {
  56. ACT8600,
  57. ACT8865,
  58. ACT8846,
  59. };
  60. /**
  61. * act8865_regulator_data - regulator data
  62. * @id: regulator id
  63. * @name: regulator name
  64. * @init_data: regulator init data
  65. * @of_node: device tree node (optional)
  66. */
  67. struct act8865_regulator_data {
  68. int id;
  69. const char *name;
  70. struct regulator_init_data *init_data;
  71. struct device_node *of_node;
  72. };
  73. /**
  74. * act8865_platform_data - platform data for act8865
  75. * @num_regulators: number of regulators used
  76. * @regulators: pointer to regulators used
  77. */
  78. struct act8865_platform_data {
  79. int num_regulators;
  80. struct act8865_regulator_data *regulators;
  81. };
  82. #endif