regulator: Add LM3631 driver
PATCH 9/10 regulator: Add LM3631 driver
LM3631 regulator driver has 5 regulators.
One boost output and four LDOs are used for the display module. Boost voltage is configurable but always on.
Supported operations for LDOs are enabled/disabled and voltage change.
--- drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/lm3631-regulator.c | 285 ++++++++++++++++++++++++++++++++++ 3 files changed, 294 insertions(+) create mode 100644 drivers/regulator/lm3631-regulator.c
drivers/regulator/Kconfig +8 -0
@@ -221,6 +221,14 @@ config REGULATOR_ISL6271A help This driver supports ISL6271A voltage regulator chip. +config REGULATOR_LM3631 + tristate "TI LM3631 voltage regulators" + depends on MFD_TI_LMU + help + This driver supports LM3631 voltage regulators for the LCD bias. + One boost output voltage is configurable and always on. + Four LDOs are used for the display module. + config REGULATOR_LP3971 tristate "National Semiconductors LP3971 PMIC regulator driver" depends on I2C
drivers/regulator/Makefile +1 -0
@@ -30,6 +30,7 @@ obj-$(CONFIG_REGULATOR_DB8500_PRCMU) += db8500-prcmu.o obj-$(CONFIG_REGULATOR_FAN53555) += fan53555.o obj-$(CONFIG_REGULATOR_GPIO) += gpio-regulator.o obj-$(CONFIG_REGULATOR_ISL6271A) += isl6271a-regulator.o +obj-$(CONFIG_REGULATOR_LM3631) += lm3631-regulator.o obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o obj-$(CONFIG_REGULATOR_LP3972) += lp3972.o obj-$(CONFIG_REGULATOR_LP872X) += lp872x.o
drivers/regulator/lm3631-regulator.c new file +285 -0
285 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Mark Brown
maintainerQuoted 4 lines · Milo Kim
LM3631 regulator driver has 5 regulators.
One boost output and four LDOs are used for the display module. Boost voltage is configurable but always on.
Supported operations for LDOs are enabled/disabled and voltage change.
This looks basically good, a couple of minor nits below but nothing substantial.
drivers/regulator/lm3631-regulator.c line 46
Quoted 7 lines
drivers/regulator/lm3631-regulator.c new file +7
-0+static const int lm3631_boost_vtbl[] = { +4500000 ,4550000 ,4600000 ,4650000 ,4700000 ,4750000 ,4800000 ,4850000 , +4900000 ,4950000 ,5000000 ,5050000 ,5100000 ,5150000 ,5200000 ,5250000 , +5300000 ,5350000 ,5400000 ,5450000 ,5500000 ,5550000 ,5600000 ,5650000 , +5700000 ,5750000 ,5800000 ,5850000 ,5900000 ,5950000 ,6000000 ,6050000 , +6100000 ,6150000 ,6200000 ,6250000 ,6300000 ,6350000 , +};
This looks like a linear range so could use the linear range helpers (4.5-6.35V in steps of 0.05V)? Similarly for the LDO.
drivers/regulator/lm3631-regulator.c line 191
Quoted 7 lines
drivers/regulator/lm3631-regulator.c new file +7
-0+static struct of_regulator_match lm3631_regulator_matches[] = { + { .name ="vboost" , .driver_data = (void *)LM3631_BOOST , }, + { .name ="vcont" , .driver_data = (void *)LM3631_LDO_CONT , }, + { .name ="voref" , .driver_data = (void *)LM3631_LDO_OREF , }, + { .name ="vpos" , .driver_data = (void *)LM3631_LDO_POS , }, + { .name ="vneg" , .driver_data = (void *)LM3631_LDO_NEG , }, +};
These names don't correspond to what was in the binding document and there's a couple of extra LDOs.