mfd: s2mps11: Add samsung s2mps11 pmic
PATCH v2 6/7 mfd: s2mps11: Add samsung s2mps11 pmic
This patch support Samsung s2mps11 mfd driver. S2MPS11 can support 10 Bucks and 38 LDOs and RTC. By this patch, s2m and s5m mfd series can be supported. Especially, S2MPS11 is designed for high performance Samsung application processor.
Signed-off-by Sangbeom Kim <[email protected]>
--- drivers/mfd/Kconfig | 1 + drivers/mfd/sec-core.c | 10 + drivers/mfd/sec-irq.c | 488 ++++++++++++-------------------------- include/linux/mfd/samsung/core.h | 2 + include/linux/mfd/samsung/irq.h | 47 ++++ 5 files changed, 213 insertions(+), 335 deletions(-)
drivers/mfd/Kconfig +1 -0
@@ -473,6 +473,7 @@ config MFD_SEC_CORE depends on I2C=y && GENERIC_HARDIRQS select MFD_CORE select REGMAP_I2C + select REGMAP_IRQ help Support for the Samsung Electronics PMIC series. This driver provides common support for accessing the device,
drivers/mfd/sec-core.c +10 -0
@@ -54,6 +54,12 @@ static struct mfd_cell s5m8767_devs[] = { }, }; +static struct mfd_cell s2mps11_devs[] = { + { + .name ="s2mps11-pmic" , + }, +}; +int sec_reg_read (struct sec_pmic_dev *sec_pmic,u8 reg,void *dest) {return regmap_read (sec_pmic->regmap, reg, dest);
@@ -145,6 +151,10 @@ static int sec_pmic_probe(struct i2c_client *i2c, ret =mfd_add_devices (sec_pmic->dev,-1 , s5m8767_devs,ARRAY_SIZE (s5m8767_devs),NULL ,0 );break ; +case S2MPS11X : + ret =mfd_add_devices (sec_pmic->dev,-1 , s2mps11_devs, +ARRAY_SIZE (s2mps11_devs),NULL ,0 ); +break ;default :/* If this happens the probe function is problem */ BUG ();
drivers/mfd/sec-irq.c +153 -335
639 lines not on this page · raw message
include/linux/mfd/samsung/core.h +2 -0
@@ -48,6 +48,8 @@ struct sec_pmic_dev {int device_type;int irq_base;int irq; +struct regmap_irq_chip_data *irq_data; +int ono;u8 irq_masks_cur[NUM_IRQ_REGS ];u8 irq_masks_cache[NUM_IRQ_REGS ];
include/linux/mfd/samsung/irq.h +47 -0
53 lines not on this page · raw message
Signature · 1 line
1.7.5.4