regulator: Add support for RICOH PMIC RC5T583 regulator
The RC5T583 PMIC from RICOH consists of 4 DCDC and 10 LDOs. This driver supports the control of different regulator output through regulator interface. This driver depends on MFD driver of RC5T583 and uses mfd rc5t583 apis to communicate to device for accessing different device's registers. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
committed by
Mark Brown
parent
173f24d1ff
commit
6ffc327021
@@ -249,6 +249,26 @@ enum {
|
||||
RC5T583_EXT_PWRREQ2_CONTROL = 0x2,
|
||||
};
|
||||
|
||||
enum {
|
||||
RC5T583_REGULATOR_DC0,
|
||||
RC5T583_REGULATOR_DC1,
|
||||
RC5T583_REGULATOR_DC2,
|
||||
RC5T583_REGULATOR_DC3,
|
||||
RC5T583_REGULATOR_LDO0,
|
||||
RC5T583_REGULATOR_LDO1,
|
||||
RC5T583_REGULATOR_LDO2,
|
||||
RC5T583_REGULATOR_LDO3,
|
||||
RC5T583_REGULATOR_LDO4,
|
||||
RC5T583_REGULATOR_LDO5,
|
||||
RC5T583_REGULATOR_LDO6,
|
||||
RC5T583_REGULATOR_LDO7,
|
||||
RC5T583_REGULATOR_LDO8,
|
||||
RC5T583_REGULATOR_LDO9,
|
||||
|
||||
/* Should be last entry */
|
||||
RC5T583_REGULATOR_MAX,
|
||||
};
|
||||
|
||||
struct rc5t583 {
|
||||
struct device *dev;
|
||||
struct regmap *regmap;
|
||||
@@ -272,11 +292,20 @@ struct rc5t583 {
|
||||
* The board specific data is provided through this structure.
|
||||
* @irq_base: Irq base number on which this device registers their interrupts.
|
||||
* @enable_shutdown: Enable shutdown through the input pin "shutdown".
|
||||
* @regulator_deepsleep_slot: The slot number on which device goes to sleep
|
||||
* in device sleep mode.
|
||||
* @regulator_ext_pwr_control: External power request regulator control. The
|
||||
* regulator output enable/disable is controlled by the external
|
||||
* power request input state.
|
||||
* @reg_init_data: Regulator init data.
|
||||
*/
|
||||
|
||||
struct rc5t583_platform_data {
|
||||
int irq_base;
|
||||
bool enable_shutdown;
|
||||
int regulator_deepsleep_slot[RC5T583_REGULATOR_MAX];
|
||||
unsigned long regulator_ext_pwr_control[RC5T583_REGULATOR_MAX];
|
||||
struct regulator_init_data *reg_init_data[RC5T583_REGULATOR_MAX];
|
||||
};
|
||||
|
||||
int rc5t583_write(struct device *dev, u8 reg, uint8_t val);
|
||||
|
||||
Reference in New Issue
Block a user