Skip to content

Commit 12d821b

Browse files
akemnadebroonie
authored andcommitted
regulator: Add FP9931/JD9930 driver
Add a driver for the FP9931/JD9930 regulator. Implement handling of the PG (power good), TS_EN (temperature sensor enable), and EN (enable regulators) pins. Implement the pair of symmetric LDOs as a single regulator because they share a single voltage set register. For simplicity, just add the temperature sensor (depending on external NTC) directly. Limitations: - As these regulators are controlled together with the VCOM regulator via the EN pin, some kind of management must be in place. As the enable op is not called when the regulator is already enabled, simple refcounting seems not to work to avoid clearing EN when one regulator is still enabled. As these regulators are typically used together, this limitation should not hurt hard, just provide the is_enabled op. - As the VCOM step is quite odd (5V/255 steps), rounding is needed. Due to some limitations in the regulator core, the max/min voltages in the devicetree must match the idea of the driver how to round things exactly. - Night mode is not implemented, so only the FP9931 compatible is needed in the driver, there is no REGULATOR_MODE_NIGHT and no clear definition in the datasheet what it does, also the XON pin which seems to be an input related to that night mode is not used. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://patch.msgid.link/20251115-fp9931-submit-v3-3-92f5d0772b68@kemnade.info Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 80bbdef commit 12d821b

3 files changed

Lines changed: 562 additions & 0 deletions

File tree

drivers/regulator/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,16 @@ config REGULATOR_ISL6271A
500500
help
501501
This driver supports ISL6271A voltage regulator chip.
502502

503+
config REGULATOR_FP9931
504+
tristate "FitiPower FP9931/JD9930 EPD regulator"
505+
depends on I2C
506+
select REGMAP_I2C
507+
help
508+
This driver supports the FP9931/JD9930 voltage regulator chip
509+
which is used to provide power to Electronic Paper Displays
510+
so it is found in E-Book readers.
511+
If HWWON is enabled, it also provides temperature measurement.
512+
503513
config REGULATOR_LM363X
504514
tristate "TI LM363X voltage regulators"
505515
depends on MFD_TI_LMU

drivers/regulator/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ obj-$(CONFIG_REGULATOR_HI6421V600) += hi6421v600-regulator.o
5959
obj-$(CONFIG_REGULATOR_HI655X) += hi655x-regulator.o
6060
obj-$(CONFIG_REGULATOR_ISL6271A) += isl6271a-regulator.o
6161
obj-$(CONFIG_REGULATOR_ISL9305) += isl9305.o
62+
obj-$(CONFIG_REGULATOR_FP9931) += fp9931.o
6263
obj-$(CONFIG_REGULATOR_LM363X) += lm363x-regulator.o
6364
obj-$(CONFIG_REGULATOR_LOCHNAGAR) += lochnagar-regulator.o
6465
obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o

0 commit comments

Comments
 (0)