summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps65912-regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: tps65912: Add regulator driver for the TPS65912 PMICAndrew F. Davis2016-02-111-0/+168
| | | | | | | | | | | | This patch adds support for TPS65912 PMIC regulators. The regulators set consists of 4 DCDCs and 10 LDOs. The output voltages are configurable and are meant to supply power to the main processor and other components. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: tps65912: Remove old driver in preparation for new driverAndrew F. Davis2016-02-111-541/+0
| | | | | | | | | The old tps65912 driver is being replaced, delete old driver. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* regulator: drop owner assignment from platform_driversWolfram Sang2014-10-201-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>
* Merge remote-tracking branch 'regulator/topic/linear' into regulator-nextMark Brown2013-10-241-6/+3
|\
| * regulator: Add REGULATOR_LINEAR_RANGE macroAxel Lin2013-10-111-3/+3
| | | | | | | | | | | | | | Add REGULATOR_LINEAR_RANGE macro and convert regulator drivers to use it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * regulator: Remove max_uV from struct regulator_linear_rangeAxel Lin2013-10-111-6/+3
| | | | | | | | | | | | | | | | | | linear ranges means each range has linear voltage settings. So we can calculate max_uV for each linear range in regulator core rather than set the max_uV field in drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: tps65912: Use devm_regulator_registerSachin Kamat2013-09-171-20/+4
|/ | | | | | | devm_* simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: tps65912: Convert tps65912_ops_ldo to use linear rangesAxel Lin2013-07-241-20/+19
| | | | | | | | | | | | | | | | The ldo voltage table is composed of linear ranges. Below is the equation in original code (tps65912_vsel_to_uv_ldo): 0 ... 32: uv = vsel * 25000 + 800000; 33 ... 60: uv = (vsel - 32) * 50000 + 1600000; = (vsel -33) * 50000 + 1650000; 61 ...63: uv = (vsel - 60) * 100000 + 3000000; = (vsel - 61) * 100000 + 3100000; This patch converts tps65912_ops_ldo to use multiple linear ranges APIs. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: remove use of __devexitBill Pemberton2012-11-201-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>
* regulator: remove use of __devinitBill Pemberton2012-11-201-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>
* regulator: remove use of __devexit_pBill Pemberton2012-11-201-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>
* regulator: tps65912: Convert to get_voltage_selAxel Lin2012-04-231-4/+4
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Remove unneeded include of linux/delay.h from regulator driversAxel Lin2012-04-231-1/+0
| | | | | | | | | | | | | All the drivers that need delay for the regulator voltage output voltage to stabilize after being enabled or after being set to a new value has been converted to implement enable_time and set_voltage_time_sel callbacks. Then regulator core will take care of the necessary delay. For the drivers that don't need the delay, don't need to include linux/delay.h. This patch removes the unneeded include of linux/delay.h in regulator drivers. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Convert tps65xxx regulator drivers to use devm_kzallocAxel Lin2012-04-111-5/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Use a struct to pass in regulator runtime configurationMark Brown2012-04-091-2/+7
| | | | | | | | | | | | | | 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>
* regulator: Use tps65912_get_voltage for both DCDCs and LDOsAxel Lin2012-04-011-18/+3
| | | | | | | | Now tps65912_get_voltage_dcdc and tps65912_get_voltage_ldo has exactly the same implementation. We can merge them to tps65912_get_voltage function. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Implement tps65912_list_voltage to be shared by both DCDCs and LDOsAxel Lin2012-04-011-16/+7
| | | | | | | | | Merge tps65912_list_voltage_dcdc and tps65912_list_voltage_ldo to tps65912_list_voltage. This change does not add too much complexity in tps65912_list_voltage function. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Simplify implementation of tps65912_get_voltage_dcdcAxel Lin2012-03-141-26/+5
| | | | | | | Call tps65912_get_sel_register instead of duplicating the same code. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Use tps65912_set_voltage_sel for both DCDCx and LDOxAxel Lin2012-03-141-16/+3
| | | | | | | | | | | | commit 42b5ef "regulator: tps65912: Use simple equations to get register address" uses tps65912_get_sel_register to replace tps65912_get_dcdc_sel_register and tps65912_get_ldo_sel_register. Now tps65912_set_voltage_dcdc_sel and tps65912_set_voltage_ldo_sel has exactly the same implementation. Merge them to tps65912_set_voltage_sel function. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65912: Use simple equations to get register addressAxel Lin2012-03-131-144/+18
| | | | | | | | | | The address of ctrl and sel registers can be calculated by simple equations. This patch simplifies the implementation in tps65912_get_ctrl_register and implements tps65912_get_sel_register to replace tps65912_get_dcdc_sel_register and tps65912_get_ldo_sel_register. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Use array to store dcdc_range settings for tps65912Axel Lin2012-03-111-50/+20
| | | | | | | | Then we can use the regulator id as array index to access the array. This change makes the code simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Rename set_voltage_sel callback function name to *_selAxel Lin2012-03-111-6/+6
| | | | | | | | This change improves readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Simplify the implementation of tps65912_get_voltage_dcdcAxel Lin2012-03-111-67/+45
| | | | | | | Call tps65912_list_voltage_dcdc instead of duplicating the same code. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: pass additional of_node to regulator_register()Rajendra Nayak2011-11-231-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>
* regulator: tps65912: Remove unused define of TPS65912_MAX_REG_IDAxel Lin2011-08-081-2/+0
| | | | | | | | | | | | Currently we define TPS65912_MAX_REG_ID as TPS65912_REG_LDO_10, but TPS65912_REG_LDO_10 is not defined at all. ( It looks like a typo of TPS65912_REG_LDO10 ) Currently, TPS65912_MAX_REG_ID is not used in this driver, it is safe to just remove it. 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>
* regulator: Storing tps65912 error codes in u8Dan Carpenter2011-07-311-1/+1
| | | | | | | | get_ctrl_reg() returns -EINVAL so the error handling won't work here if reg is a u8. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* tps65912: add regulator driverMargarita Olaya2011-07-311-0/+800
The tps65912 consist of 4 DCDCs and 10 LDOs. The output voltages can be configured by the SPI or I2C interface, they are meant to supply power to the main processor and other components. Signed-off-by: Margarita Olaya Cabrera <magi@slimlogic.co.uk> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
OpenPOWER on IntegriCloud