aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps6524x-regulator.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-04-20regulator: tps6524x: Fix broken use of spi_dev_get()Mark Brown1-1/+1
The tps6524x driver uses spi_dev_get() to take a copy of the SPI device it uses but has no obvious reason to do so and never calls spi_dev_put() to release the reference. Fix this to just a straight copy. Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-28spi: Drop owner assignment from spi_driversAndrew F. Davis1-1/+0
An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-02-20regulator: tps6524x: Remove redundant error messageSachin Kamat1-3/+2
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30regulator: tps6524x: use devm_regulator_register()Jingoo Han1-26/+5
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-20regulator: tps6524x: Remove redundant spi_set_drvdataSachin Kamat1-1/+0
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-30regulator: use dev_get_platdata()Jingoo Han1-1/+1
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-04-28Merge remote-tracking branch 'regulator/topic/core' into v3.9-rc8Mark Brown1-2/+1
2013-04-28regulator: Remove NULL test before calling regulator_unregister()Axel Lin1-2/+1
It's safe to call regulator_unregister() with NULL, thus remove the NULL test before regulator_unregister() calls. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-26regulator: tps6524x: Use regulator_map_voltage_ascendAxel Lin1-0/+1
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20regulator: remove use of __devinitBill Pemberton1-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_pBill Pemberton1-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-08-28regulator: tps6524x: set_current_limit should select the maximum current in specific rangeAxel Lin1-6/+4
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-02regulator: tps6524x: Convert fixed ilimsel to table basedAxel Lin1-18/+26
This patch refactors the code to get rid of the fixed_ilimsel and FIXED_ILIMSEL flag usage, and convert all the fixed ilimsel to table based (with one entry in the table). We can differentiate fixed ilimsel by checking info->n_ilimsels == 1, thus FIXED_ILIMSEL flag can be removed. This change makes the logic of the code simpler as all the ilimsels are table based now. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-02regulator: tps6524x: Convert to regulator_list_voltage_table()Axel Lin1-33/+19
This patch adds fixed_5000000_voltage table for fixed voltage, so we can convert regulator_ops to regulator_list_voltage_table. We can differentiate fixed voltage by checking rdev->desc->n_voltages == 1, thus remove the FIXED_VOLTAGE flag usage. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-20regulator: tps6524x: Fix get_voltage_sel for fixed voltageAxel Lin1-1/+1
get_voltage_sel() should return selector rather than voltage. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-11regulator: Convert tps65xxx regulator drivers to use devm_kzallocAxel Lin1-2/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-09regulator: core: Use a struct to pass in regulator runtime configurationMark Brown1-2/+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-04regulator: tps6524x: Use module_spi_driver()Mark Brown1-11/+1
Unusual to see a regulator driver not using subsys_initcall() but the deferred probe support should make this viable. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Convert tps6524x to get_voltage_selAxel Lin1-3/+3
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Convert tps6524x to set_voltage_selAxel Lin1-15/+3
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-21Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulatorLinus Torvalds1-3/+1
Pull regulator updates for 3.4 from Mark Brown: "This has been a fairly quiet release from a regulator point of view, the only real framework features added were devm support and a convenience helper for setting up fixed voltage regulators. We also added a couple of drivers (but will drop the BQ240022 driver via the arm-soc tree as it's been replaced by the more generic gpio-regulator driver) and Axel Lin continued his relentless and generally awesome stream of fixes and cleanups." * tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (93 commits) regulator: Fix up a confusing dev_warn when DT lookup fails regulator: Convert tps6507x to set_voltage_sel regulator: Refactor tps6507x to use one tps6507x_pmic_ops for all LDOs and DCDCs regulator: Make s5m8767_get_voltage_register always return correct register regulator: s5m8767: Check pdata->buck[2|3|4]_gpiodvs earlier regulator: tps65910: Provide settling time for DCDC voltage change regulator: Add Anatop regulator driver regulator: Simplify implementation of tps65912_get_voltage_dcdc regulator: Use tps65912_set_voltage_sel for both DCDCx and LDOx regulator: tps65910: Provide settling time for enabling rails regulator: max8925: Use DIV_ROUND_UP macro regulator: tps65912: Use simple equations to get register address regulator: Fix the logic of tps65910_get_mode regulator: Merge tps65217_pmic_ldo234_ops and tps65217_pmic_dcdc_ops to tps65217_pmic_ops regulator: Use DIV_ROUND_CLOSEST in wm8350_isink_get_current regulator: Use array to store dcdc_range settings for tps65912 regulator: Rename s5m8767_convert_voltage to s5m8767_convert_voltage_to_sel regulator: tps6524x: Remove unneeded comment for N_REGULATORS regulator: Rename set_voltage_sel callback function name to *_sel regulator: Fix s5m8767_set_voltage_time_sel calculation value ...
2012-03-11regulator: tps6524x: Remove unneeded comment for N_REGULATORSAxel Lin1-3/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-11regulator: Fix setting selector in tps6524x set_voltage functionAxel Lin1-1/+1
Don't assign the voltage to selector. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2011-11-23regulator: pass additional of_node to regulator_register()Rajendra Nayak1-1/+1
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-03-26regulator: fix tps6524x section mismatchRandy Dunlap1-1/+1
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Fix section mismatch that is caused by init code calling exit code: pmic_remove() cannot be marked as __devexit. WARNING: drivers/regulator/tps6524x-regulator.o(.devinit.text+0x205): Section mismatch in reference from the function pmic_probe() to the function .devexit.text:pmic_remove() The function __devinit pmic_probe() references a function __devexit pmic_remove(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __devexit annotation of pmic_remove() so it may be used outside an exit section. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Cyril Chemparathy <cyril@ti.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-12regulator: add driver for tps6524x regulatorCyril Chemparathy1-0/+693
TPS6524X provides three step-down converters and two general-purpose LDO voltage regulators. This device is interfaced using SPI. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>