aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/tps65132-regulator.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-25regulator: tps65132: Add of_match tableGravatar André Apitzsch 1-0/+7
Add of_match table for "ti,tps65132" compatible string. This fixes automatic driver loading when using device-tree, and if built as a module like major linux distributions do. Signed-off-by: André Apitzsch <git@apitzsch.eu> Link: https://msgid.link/r/20240325-of_tps65132-v1-1-86a5f7ef4ede@apitzsch.eu Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-08regulator: Switch i2c drivers back to use .probe()Gravatar Uwe Kleine-König 1-1/+1
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de Link: https://lore.kernel.org/r/20230505220218.1239542-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org
2023-03-20regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14Gravatar Douglas Anderson 1-0/+1
Probing of regulators can be a slow operation and can contribute to slower boot times. This is especially true if a regulator is turned on at probe time (with regulator-boot-on or regulator-always-on) and the regulator requires delays (off-on-time, ramp time, etc). While the overall kernel is not ready to switch to async probe by default, as per the discussion on the mailing lists [1] it is believed that the regulator subsystem is in good shape and we can move regulator drivers over wholesale. There is no way to just magically opt in all regulators (regulators are just normal drivers like platform_driver), so we set PROBE_PREFER_ASYNCHRONOUS for all regulators found in 'drivers/regulator' individually. Given the number of drivers touched and the impossibility to test this ahead of time, it wouldn't be shocking at all if this caused a regression for someone. If there is a regression caused by this patch, it's likely to be one of the cases talked about in [1]. As a "quick fix", drivers involved in the regression could be fixed by changing them to PROBE_FORCE_SYNCHRONOUS. That being said, the correct fix would be to directly fix the problem that caused the issue with async probe. The approach here follows a similar approach that was used for the mmc subsystem several years ago [2]. In fact, I ran nearly the same python script to auto-generate the changes. The only thing I changed was to search for "i2c_driver", "spmi_driver", and "spi_driver" in addition to "platform_driver". [1] https://lore.kernel.org/r/06db017f-e985-4434-8d1d-02ca2100cca0@sirena.org.uk [2] https://lore.kernel.org/r/20200903232441.2694866-1-dianders@chromium.org/ Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20230316125351.1.I2a4677392a38db5758dee0788b2cea5872562a82@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13regulator: Convert i2c drivers to use .probe_newGravatar Axel Lin 1-3/+2
Use the new .probe_new for i2c drivers. These drivers do not use const struct i2c_device_id * argument, so convert them to utilise the simplified i2c driver registration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20200109155808.22003-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-07regulator: tps65132: switch to using devm_fwnode_gpiod_get()Gravatar Dmitry Torokhov 1-7/+10
devm_fwnode_get_index_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Note that we no longer need to check for NULL as devm_fwnode_gpiod_get() will return -ENOENT if GPIO is missing. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20191004231017.130290-7-dmitry.torokhov@gmail.com Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-09-05regulator: tps65132: Stop parsing DT when gpio is not foundGravatar Guido Günther 1-2/+2
In case of a missing (optional) gpio don't fall through up to "ti,active-discharge-time-us" due to devm_fwnode_get_index_gpiod_from_child() returning NULL (since gpiod_get_from_of_node() returned NULL) but rather indicate success as intended. This makes the driver probe correctly when e.g. only the enable gpio is given. Signed-off-by: Guido Günther <agx@sigxcpu.org> Link: https://lore.kernel.org/r/363bd50cc7c60daa57d614a341d1fd649f05194c.1567625660.git.agx@sigxcpu.org Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-21regulator: tps65132: Constify tps65132_regulator_ops and tps_regs_descGravatar Axel Lin 1-2/+2
The tps65132_regulator_ops and tps_regs_desc never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-21regulator: tps65132: Remove unneeded fields from struct tps65132_regulatorGravatar Axel Lin 1-14/+11
These fields are not really need, remove them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-14regulator: tps65132: fix platform_no_drv_owner.cocci warningsGravatar kbuild test robot 1-1/+0
drivers/regulator/tps65132-regulator.c:274:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-13regulator: tps65132: Fix off-by-one for .max_register settingGravatar Axel Lin 1-1/+1
TPS65132_REG_CONTROL(0xFF) is the latest valid register. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-12regulator: tps65132: add regulator driver for TI TPS65132Gravatar Venkat Reddy Talla 1-0/+285
Add regulator driver for the device TI TPS65132 which is single inductor - dual output power supply device. TPS65132 device is designed to support general positive/negative driven applications like TFT display panels. TPS65132 regulator driver supports to enable/disable and set voltage on its output. Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>