summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
AgeCommit message (Collapse)Author
2013-01-29Merge remote-tracking branch 'regulator/fix/tps80031' into tmpMark Brown
2013-01-26regulator: tps80031: Use IS_ERR to check return value of regulator_register()Axel Lin
regulator_register() does not return NULL, it returns ERR_PTR on error. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26regulators: db8500: Fix compile failure for drivers/regulator/dbx500-prcmu.cSteven Rostedt
Building for the snowball board, I ran into this compile failure: CC drivers/regulator/dbx500-prcmu.o arm-test.git/drivers/regulator/dbx500-prcmu.c:119:11: error: 'THIS_MODULE' undeclared here (not in a function) make[3]: *** [drivers/regulator/dbx500-prcmu.o] Error 1 make[2]: *** [drivers/regulator] Error 2 Commit 38e968380 "regulators/db8500: split off shared dbx500 code" separated out the dbx500 code but did not copy over the required include to linux/module.h. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-15Merge remote-tracking branch 'regulator/fix/s5m8767' into tmpMark Brown
2013-01-15Merge remote-tracking branch 'regulator/fix/max8998' into tmpMark Brown
2013-01-15Merge remote-tracking branch 'regulator/fix/max8997' into tmpMark Brown
2013-01-15Merge remote-tracking branch 'regulator/fix/core' into tmpMark Brown
2013-01-10regulator: max8998: Ensure enough delay time for ↵Axel Lin
max8998_set_voltage_buck_time_sel Use DIV_ROUND_UP to prevent truncation by integer division issue. This ensures we return enough delay time. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2013-01-08regulator: max8998: Use uV in voltage_map_descAxel Lin
Integer division may truncate. This happens when pdata->buckx_voltagex setting is not align with 1000 uV. Thus use uV in voltage_map_desc, this ensures the selected voltage won't less than pdata buckx_voltagex settings. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2013-01-08regulator: max8997: Use uV in voltage_map_descAxel Lin
Current code does integer division (min_vol = min_uV / 1000) before pass min_vol to max8997_get_voltage_proper_val(). So it is possible min_vol is truncated to a smaller value. For example, if the request min_uV is 800900 for ldo. min_vol = 800900 / 1000 = 800 (mV) Then max8997_get_voltage_proper_val returns 800 mV for this case which is lower than the requested voltage. Use uV rather than mV in voltage_map_desc to prevent truncation by integer division. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2013-01-03Drivers: regulator: remove __dev* attributes.Greg Kroah-Hartman
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Liam Girdwood <lrg@ti.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03regulator: core: Fix comment for regulator_register()Axel Lin
regulator_register() does not return 0 on success, fix the comment. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24regulator: core: Fix continuous_voltage_range case in ↵Axel Lin
regulator_can_change_voltage Regulator drivers with continuous_voltage_range flag set allows not setting n_voltages. Thus if continuous_voltage_range is set, check the constraint range instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24regulator: s5m8767: Fix probe failure due to stack corruptionInderpal Singh
The function sec_reg_read invokes regmap_read which expects unsigned int * as the destination address. The existing driver is passing address of local variable "val" which is u8. This causes the stack corruption and following dump is observed during probe. Hence change "val" from u8 to unsigned int. Unable to handle kernel paging request at virtual address 02410020 pgd = c0004000 [02410020] *pgd=00000000 Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 Not tainted (3.6.0-00696-g98a28b18-dirty #27) PC is at 0x2410020 LR is at _regulator_get_voltage+0x3c/0x70 pc : [<02410020>] lr : [<c02395d4>] psr: 20000013 sp : cf839b68 ip : 00000000 fp : cf92d410 r10: 0000cfd0 r9 : c06d9878 r8 : 0000f0a0 r7 : cf839b70 r6 : cf92d400 r5 : 00000011 r4 : cf000000 r3 : 02410020 r2 : 00000000 r1 : 00000048 r0 : cf000000 Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel ........................... ................................. [<c02395d4>] (_regulator_get_voltage+0x3c/0x70) from [<c023ad80>] (print_constraints+0x50/0x36c) [<c023ad80>] (print_constraints+0x50/0x36c) from [<c023e504>] (set_machine_constraints+0xe8/0x2b0) [<c023e504>] (set_machine_constraints+0xe8/0x2b0) from [<c023e9c8>] (regulator_register+0x2fc/0x604) [<c023e9c8>] (regulator_register+0x2fc/0x604) from [<c049d628>] (s5m8767_pmic_probe+0x688/0x718) [<c049d628>] (s5m8767_pmic_probe+0x688/0x718) from [<c029915c>] (platform_drv_probe+0x18/0x1c) [<c029915c>] (platform_drv_probe+0x18/0x1c) from [<c0297dd0>] (really_probe+0x68/0x1f4) [<c0297dd0>] (really_probe+0x68/0x1f4) from [<c0298070>] (driver_probe_device+0x30/0x48) Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-11Merge remote-tracking branch 'regulator/topic/sm8767' into regulator-nextMark Brown
2012-12-11Merge remote-tracking branch 'regulator/topic/change' into regulator-nextMark Brown
2012-12-11regulator: core: Fix logic to determinate if regulator can change voltageAxel Lin
Having a linear_min_sel setting means the first linear_min_sel selectors are invalid. We need to subtract linear_min_sel when use n_voltages to determinate if regulator can change voltage. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-11Merge branch 'topic/min' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-change
2012-12-11regulator: s5m8767: Fix to work even if no DVS gpio presentAmit Daniel Kachhap
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-11regulator: s5m8767: Fix to read the first DVS register.Amit Daniel Kachhap
This patch modifies the DVS register read function to select correct DVS1 register. This change is required because the GPIO select pin is 000 in unintialized state and hence selects the DVS1 register. Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-11regulator: s5m8767: Fix to work when platform registers less regulatorsAmit Daniel Kachhap
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10Merge remote-tracking branch 'regulator/topic/gpio' into regulator-nextMark Brown
2012-12-10regulator: gpio-regulator: gpio_set_value should use cansleepLee Jones
If it's possible for gpio_set_value to sleep, we should be using the *_cansleep call instead. This patch fixes multiple warnings from gpiolib. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regulator: gpio-regulator: Fix logical error in for() loopLee Jones
The cond-statement of this particular for() loop will always be true as long as at least one voltage-shifting GPIO is present. If it wasn't for the break below, we'd be stuck in a forever loop. This patch inserts the correct cond-statement into the statement. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10Merge remote-tracking branch 'regulator/topic/wm831x' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/tps80031' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/tps65910' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/tps6586x' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/tps65090' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/tps516312' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/s2mps11' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/palmas' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/min' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/max8997' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/max8973' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/max77686' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/max1586' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/lp8788' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/log' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/hotplug' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/gpio' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/da9055' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/da9052' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/change' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/as3711' into regulator-nextMark Brown
2012-12-10Merge remote-tracking branch 'regulator/topic/arizona' into regulator-nextMark Brown
2012-12-10regulator: anatop: Use regulator_[get|set]_voltage_sel_regmapAxel Lin
Call regulator_[get|set]_voltage_sel_regmap instead of open code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Ying-Chun Liu <paulliu@debian.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regulator: anatop: Use linear_min_sel with linear mappingAxel Lin
By setting linear_min_sel to anatop_reg->min_bit_val, we can avoid adjust the anatop_reg->min_bit_val offset in [set|get]_voltage_sel. With this chance we can refactor this driver to use regulator_[get|set]_voltage_sel_regmap. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Ying-Chun Liu <paulliu@debian.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regulator: max1586: Implement get_voltage_sel callbackAxel Lin
This is required since commit f7df20ec32 "regulator: core: Use list_voltage() to read single voltage regulators", otherwise _regulator_get_voltage returns rdev->desc->ops->list_voltage(rdev, 0). The Maxim 1586 controls V3 and V6 voltages, but offers no way of reading back the set up value. Thus this patch caches the setting when setting new voltage. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regulator: lp8788-buck: Kill _gpio_request functionAxel Lin
Simply use devm_gpio_request_one() instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>