summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-04-09regulator: core: Use a struct to pass in regulator runtime configurationMark Brown
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-09Merge branch 'regulator-register' into regulator-driversMark Brown
2012-04-06regulator: Convert rc5t583 to set_voltageAxel Lin
Not every regulator driver should implement set_voltage_sel callback. See commit e8eef82 "regulator: Provide a selector based set_voltage_sel() operation". For rc5t583, the regulator voltage can be mapped onto selector values with a simple calculation, thus implement set_voltage is better than set_voltage_sel. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: max8649: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: max1586: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: tps65217: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: AnilKumar Ch <anilkumar@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: tps6105x: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: max8952: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: max8660: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: Convert twl4030ldo_set_voltage to set_voltage_selAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: rc5t583: Correct MODULE LICENSE to GPL v2Laxman Dewangan
Fixing build issue reported by Paul Gortmaker: It appears this breaks linux-next allmodconfig build, because it uses an uppercase V in the v2 of its MODULE_LICENSE. FATAL: modpost: GPL-incompatible module rc5t583-regulator.ko uses GPL-only symbol 'platform_driver_unregister' make[2]: *** [__modpost] Error 1 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06regulator: rc5t583: Simplify RC5T583_REG macroAxel Lin
Simplify RC5T583_REG macro by removing _vout_reg and _ds_reg parameters. The naming for vout_reg and deepsleep_reg can be replaced by: .vout_reg = RC5T583_REG_##_id##DAC, .deepsleep_reg = RC5T583_REG_##_id##DAC_DS, 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>
2012-04-05regulator: rc5t583: Remove nsteps from struct rc5t583_regulator_infoAxel Lin
The nsteps can be calculated by (_max_mv - _min_mv) * 1000 / _step_uV + 1, thus we can remove _nsteps from RC5T583_REG macro, and then remove nsteps from struct rc5t583_regulator_info. 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>
2012-04-05regulator: rc5t583: Fix off-by-one valid range checking for selectorAxel Lin
The valid selector should be 0 ... nsteps-1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-05regulator: da9052: Remove unneeded devm_kfree callsAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-05regulator: pcap: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-05regulator: lp3972: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-05regulator: lp3971: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-05regulator: isl6271a: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-05regulator: pcf50633: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-05regulator: ad5398: Constify regulator_descAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: Fix rc5t583_regulator_probe error handlingAxel Lin
1. regulator_register returns ERR_PTR on error, thus use IS_ERR to check the return value. 2. Fix off-by-one for unregistering the registered regulator. Current code does not unregister regs[0].rdev in clean_exit. 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>
2012-04-04regulator: aat2870: Add MODULE_ALIASMark Brown
Not that it's ever likely to get used. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jin Park <jinyoungp@nvidia.com>
2012-04-04regulator: Add support for RICOH PMIC RC5T583 regulatorLaxman Dewangan
The RC5T583 PMIC from RICOH consists of 4 DCDC and 10 LDOs. This driver supports the control of different regulator output through regulator interface. This driver depends on MFD driver of RC5T583 and uses mfd rc5t583 apis to communicate to device for accessing different device's registers. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: wm8994: Constify regulator_descMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: wm8350: Constify regulator_descMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: core: Constify the regulator_desc passed in when registeringMark Brown
Drivers should be able to declare their descriptors const and the framework shouldn't ever be modifying the desciptor. Make the parameter and the pointer in regulator_dev const to enforce this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: tps6524x: Use module_spi_driver()Mark Brown
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-04regulator: max8860: Remove announcement on probeMark Brown
The core already announces constraints and we're not adding any new information such as the chip revision. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: max8649: Remove contentless announcement log messageMark Brown
The core already logs the regulator constraints as it is registered and we're not adding any extra content about the device such as the chip revision. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: lp3971: Convert to module_i2c_driver()Mark Brown
Unusual to see a regulator driver not using subsys_initcall() but with the probe deferral support should be becoming more and more viable. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: isl6271a: Allow missing init_data for diagnosticsMark Brown
The regulator core supports this to allow the configuration to be inspected at runtime even if no software mangement is enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2012-04-04regulator: gpio-regulator: Basic devm_kzalloc() conversionMark Brown
There's some other allocations but they're not so trivial as they use kmemdup() and kstrdup(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: gpio-regulator: Sort in MakefileMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-02regulator: Convert mc13xxx regulator drivers to set_voltage_selAxel Lin
Convert mc13892_sw_regulator_ops and mc13xxx_regulator_ops to set_voltage_sel. mc13xxx_get_best_voltage_index function is not used now, remove it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-02regulator: fixed: Support for open drain gpio pinLaxman Dewangan
Adding flag on fixed regulator board configuration structure to specify whether gpio is open drain type or not. Passing this information to gpio library when requesting gpio so that gpio driver can set the pin state accordingly, for open drain type: - Pin can be set HIGH as setting as input, PULL UP on pin make this as HIGH. - Pin can be set LOW as setting it as output and drive to LOW. The non-open drain pin can be set HIGH/LOW by setting it to output and driving it to HIGH/LOW. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-02regulator: Add support for tps62362 and tps62363 in tps62360-regulator driverAxel Lin
According to the datasheet[1], tps62360 is register compatible with tps62362. tps62361B is register compatible with tps62363. Thus this patch adds support for tps62362 and tps62363. [1] http://www.ti.com/litv/pdf/slvsau9b 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>
2012-04-02regulator: Add missing n_voltages setting for max8925Axel Lin
The n_voltages are the same for all regulators: (max - min / step) + 1 == 64. The vol_shift is always 0, and the vol_nbits is always the same as n_voltages setting. Thus we can remove vol_shitf and vol_nbits fields from struct max8925_regulator_info. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-02regulator: Set list_voltage callback for max8925Axel Lin
Current code implements max8925_list_voltage but does not set the list_voltage callback function in max8925_regulator_[ldo|sdv]_ops. Fix it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Convert 88pm8607 to get_voltage_selAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Jett Zhou <jtzhou@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Convert 88pm8607 to set_voltage_selAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Jett Zhou <jtzhou@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Add missing n_voltages setting for 88pm8607Axel Lin
Then we can remove the vol_nbits field from struct pm8607_regulator_info. Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Jett Zhou <jtzhou@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Set list_voltage callback for 88pm8607Axel Lin
Current code implements pm8607_list_voltage but does not set the list_voltage callback function in pm8607_regulator_ops. Fix it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Jett Zhou <jtzhou@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Trivial comment fix for wm831x-ldo driverAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Convert tps6524x to get_voltage_selAxel Lin
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 Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: ad5398: Use devm_kzallocAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: ad5398: show changing current in uAAxel Lin
Integer division may truncate the result. Current code shows changing current is 0mA when selector is 1 ... 8. For example: selector = 1 ad5398_calc_current returns 117, debug message shows 117/1000 = 0mA selector = 2 ad5398_calc_current returns 234, debug message shows 234/1000 = 0mA selector = 3 ad5398_calc_current returns 351, debug message shows 351/1000 = 0mA ............ selector = 8 ad5398_calc_current returns 937, debug message shows 937/1000 = 0mA Show the changing current in uA makes it easier for debugging. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: tps65023: Remove unused client field from struct tps_pmicAxel Lin
The client field of struct tps_pmic is not used after converting to regmap API. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Remove unused name and client fields from struct tps62360_chipAxel Lin
The client field of struct tps62360_chip is not used after converting to regmap. The name field of struct tps62360_chip is not used in this driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>