summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-04-09Merge branch 'regulator-register' into regulator-driversMark Brown16-17/+19
2012-04-06regulator: Convert rc5t583 to set_voltageAxel Lin1-8/+15
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 Lin1-1/+1
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 Lin1-1/+1
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 Lin1-1/+1
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 Lin1-1/+1
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 Lin1-1/+1
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 Lin1-1/+1
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 Lin1-23/+4
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 Dewangan1-1/+1
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 Lin1-32/+18
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 Lin1-20/+17
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 Lin1-1/+1
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 Lin1-10/+2
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 Lin1-1/+1
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 Lin1-1/+1
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 Lin1-1/+1
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 Lin1-1/+1
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 Lin1-1/+1
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 Lin1-1/+1
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-05regulator: Fix rc5t583_regulator_probe error handlingAxel Lin1-2/+2
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 Brown1-0/+1
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 Dewangan4-0/+407
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 Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: wm8350: Constify regulator_descMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04regulator: core: Constify the regulator_desc passed in when registeringMark Brown2-3/+5
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 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-04regulator: max8860: Remove announcement on probeMark Brown1-1/+0
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 Brown1-1/+0
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 Brown1-17/+1
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 Brown1-5/+0
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 Brown1-3/+2
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 Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-03regulator: Convert mc13xxx regulator drivers to set_voltage_selAxel Lin3-64/+9
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-03regulator: fixed: Support for open drain gpio pinLaxman Dewangan2-12/+18
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-03regulator: Add support for tps62362 and tps62363 in tps62360-regulator driverAxel Lin2-10/+24
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-03regulator: Add missing n_voltages setting for max8925Axel Lin1-10/+5
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-03regulator: Set list_voltage callback for max8925Axel Lin1-0/+2
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 Lin1-3/+3
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 Lin1-39/+4
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 Lin1-26/+25
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 Lin1-0/+1
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 Lin1-2/+2
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 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-04-01regulator: ad5398: Use devm_kzallocAxel Lin1-4/+1
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 Lin1-2/+2
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 Lin1-2/+0
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 Lin1-4/+0
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>
2012-04-01regulator: Refactor to use one da9052_ldo_ops/da9052_dcdc_ops for all LDOs/DCDCsAxel Lin1-186/+44
In current implementation, da9052_ldo_ops and da9052_ldo5_6_ops are very similar, only the set_voltage is slightly different. da9052_buckperi_ops and da9052_dcdc_ops are also similar. This patch adds da9052_regulator_set_voltage for the set_voltage callback used by all LDOs and DCDCs. Rework da9052_get_regulator_voltage_sel and da9052_set_dcdc_voltage to make it possible to be shared by all DCDCs. Rework da9052_list_voltage to make it to be shared by all DCDCs and LDOs. Then we can remove da9052_ldo5_6_ops and da9052_buckperi_ops. We can also remove DA9052_LDO5_6 and DA9052_BUCKPERI macros which is not used now. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>