summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps65185.c
AgeCommit message (Collapse)Author
2026-02-23regulator: tps65185: check devm_kzalloc() result in probeYufan Chen
tps65185_probe() dereferences the allocation result immediately by using data->regmap. If devm_kzalloc() returns NULL under memory pressure, this leads to a NULL pointer dereference. Add the missing allocation check and return -ENOMEM on failure. Signed-off-by: Yufan Chen <ericterminal@gmail.com> Link: https://patch.msgid.link/20260222104035.90790-1-ericterminal@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-12regulator: Add TPS65185 driverAndreas Kemnade
Add a driver for the TPS65185 regulator. Implement handling of the various gpio pins. Because the PWRUP (=enable) pin functionality can be achieved by just using two bits instead, just ensure that it is set to a stable value. Implement the pair of symmetric LDOs as a single regulator because they share a single voltage set register. As the VCOM regulator sits behind that machinery, just define that one as a supply. For simplicity, just add the temperature sensor (depending on external NTC) directly. There is a mechanism to measure some kick-back voltage during a defined EPD operation, to calibrate the VCOM voltage setting and store that non-volatile in the chip to be the power up default setup. That is not implemented yet in the driver, but that also means that there is a non-factory default value in these registers after power-up. Tested-by: Josua Mayer <josua.mayer@jm0.eu> Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://patch.msgid.link/20260102-tps65185-submit-v3-2-23bda35772f2@kemnade.info Signed-off-by: Mark Brown <broonie@kernel.org>