aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/tps6105x-regulator.c
AgeCommit message (Collapse)AuthorFilesLines
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-09-01regulator: tps6105x: Constify tps6105x_regulator_opsGravatar Rikard Falkeborn 1-1/+1
The only usage of tps6105x_regulator_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200829221104.20870-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-11-20regulator: tps6105x: add optional devicetree supportGravatar Sven Van Asbroeck 1-0/+2
Tell the regulator framework to retrieve regulator init data from the 'regulator' subnode, or from the parent mfd device's platform data. Example: i2c0 { tps61052@33 { compatible = "ti,tps61052"; reg = <0x33>; regulator { regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-always-on; }; }; }; Tree: next-20191118 Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com> Link: https://lore.kernel.org/r/20191119154611.29625-3-TheSven73@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194Gravatar Thomas Gleixner 1-2/+1
Based on 1 normalized pattern(s): license terms gnu general public license gpl version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 161 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-18regulator: tps6105x: Convert to use regmap helper functionsGravatar Axel Lin 1-83/+12
Since commit 7e5071199355 ("mfd: tps6105x: Use i2c regmap to access registers"), we can use regmap helper functions instead of open coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Denis Grigoryev <grigoryev@fastwel.ru> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-05mfd: tps6105x: Use i2c regmap to access registersGravatar Grigoryev Denis 1-8/+8
This patch modifies tps6105x and associated function driver to use regmap instead of operating directly on i2c. Signed-off-by: Denis Grigoryev <grigoryev@fastwel.ru> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-10-20regulator: drop owner assignment from platform_driversGravatar Wolfram Sang 1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-10-24Merge remote-tracking branch 'regulator/topic/tps6105x' into regulator-nextGravatar Mark Brown 1-1/+1
2013-10-15regulator: tps6105x: Fix checkpatch issueGravatar Jingoo Han 1-1/+1
Fix the following checkpatch warning. WARNING: unnecessary whitespace before a quoted newline Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: tps6105x: use devm_regulator_register()Gravatar Jingoo Han 1-10/+3
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2012-11-20regulator: remove use of __devexitGravatar Bill Pemberton 1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20regulator: remove use of __devinitGravatar Bill Pemberton 1-1/+1
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20regulator: remove use of __devexit_pGravatar Bill Pemberton 1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03regulator: tps6105x: Use regulator_list_voltage_table()Gravatar Axel Lin 1-11/+3
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-09regulator: core: Use a struct to pass in regulator runtime configurationGravatar Mark Brown 1-3/+6
Rather than adding new arguments to regulator_register() every time we want to add a new bit of dynamic information at runtime change the function to take these via a struct. By doing this we avoid needing to do further changes like the recent addition of device tree support which required each regulator driver to be updated to take an additional parameter. The regulator_desc which should (mostly) be static data is still passed separately as most drivers are able to configure this statically at build time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: tps6105x: Constify regulator_descGravatar Axel Lin 1-1/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23regulator: pass additional of_node to regulator_register()Gravatar Rajendra Nayak 1-1/+2
With device tree support for regulators, its needed that the regulator_dev->dev device has the right of_node attached. To be able to do this add an additional parameter to the regulator_register() api, wherein the dt-adapted driver can then pass this additional info onto the regulator core. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-27regulator: Add missing platform_set_drvdata in tps6105x_regulator_probeGravatar Axel Lin 1-0/+1
Otherwise, calling platform_get_drvdata in tps6105x_regulator_remove returns NULL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-05-26mfd: Use mfd cell platform_data for tps6105x cells platform bitsGravatar Samuel Ortiz 1-2/+2
With the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23regulator: Add a subdriver for TI TPS6105x regulator portions v2Gravatar Linus Walleij 1-0/+196
This adds a subdriver for the regulator found inside the TPS61050 and TPS61052 chips. Cc: Samuel Ortiz <samuel.ortiz@intel.com> Cc: Ola Lilja <ola.o.lilja@stericsson.com> Cc: Jonas Aberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>