aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'regulator/fix/tps65910' into tmpMark Brown2013-02-06
|\
| * regulator: tps65910: Fix using wrong dev argument for calling of_regulator_matchAxel Lin2013-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | The dev parameter is the device requesting the data. In this case it should be &pdev->dev rather than pdev->dev.parent. The dev parameter is used to call devm_kzalloc in of_get_regulator_init_data(), which means this fixes a memory leak because the memory is allocated every time probe() is called, thus it should be freed when this driver is unloaded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan<ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'regulator/fix/tps65217' into tmpMark Brown2013-02-06
|\ \
| * | regulator: tps65217: Fix using wrong dev argument for calling of_regulator_matchAxel Lin2013-01-24
| |/ | | | | | | | | | | | | | | | | | | | | | | The dev parameter is the device requestiong the data. In this case it should be &pdev->dev rather than pdev->dev.parent. The dev parameter is used to call devm_kzalloc in of_get_regulator_init_data(), which means this fixes a memory leak because the memory is allocated every time probe() is called, thus it should be freed when this driver is unloaded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'regulator/fix/s2mps11' into tmpMark Brown2013-02-06
|\ \
| * | regulator: s2mps11: fix incorrect register for buck10Alim Akhtar2013-01-31
| |/ | | | | | | | | | | | | | | | | For BUCK10 the control registers are wrongly set as buck9 control register This patch corrects the control registers for buck10 Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* | Merge remote-tracking branch 'regulator/fix/of' into tmpMark Brown2013-02-06
|\ \
| * | regulator: clear state each invocation of of_regulator_matchStephen Warren2013-01-29
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_regulator_match() saves some dynamcially allocated state into the match table that's passed to it. By implementation and not contract, for each match table entry, if non-NULL state is already present, of_regulator_match() will not overwrite it. of_regulator_match() is typically called each time a regulator is probe()d. This means it is called with the same match table over and over again if a regulator triggers deferred probe. This results in stale, kfree()d data being left in the match table from probe to probe, which causes a variety of crashes or use of invalid data. Explicitly free all output state from of_regulator_match() before generating new results in order to avoid this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* | Merge remote-tracking branch 'regulator/fix/max8998' into tmpMark Brown2013-02-06
|\ \
| * | regulator: max8998: fix incorrect min_uV value for ldo10Marek Szyprowski2013-01-26
| |/ | | | | | | | | | | | | | | | | | | | | Correct value for minimal voltage for ldo10 output is 950000 uV. This patch fixes the typo introduced by patch adf6178ad5552a7f2f742a8c85343c50 ("regulator: max8998: Use uV in voltage_map_desc"), what solves broken probe of max8998 in v3.8-rc4. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Cc: stable@vger.kernel.org Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'regulator/fix/max8997' into tmpMark Brown2013-02-06
|\ \
| * | regulator: max8997: Fix using wrong dev argument at various placesAxel Lin2013-01-26
| |/ | | | | | | | | | | | | | | | | Use &pdev->dev rather than iodev->dev for dev_err(), dev_warn() and dev_info(). Use &pdev->dev rather than iodev->dev for devm_kzalloc() and of_get_regulator_init_data(), this fixes memory leak. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'regulator/fix/max8907' into tmpMark Brown2013-02-06
|\ \
| * | regulator: max8907: Fix using wrong dev argument for calling of_regulator_matchAxel Lin2013-01-26
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The dev parameter is the device requesting the data. In this case it should be &pdev->dev rather than pdev->dev.parent. The dev parameter is used to call devm_kzalloc in of_get_regulator_init_data(), which means this fixes a memory leak because the memory is allocated every time probe() is called, thus it should be freed when this driver is unloaded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'regulator/fix/max77686' into tmpMark Brown2013-02-06
|\ \
| * | regulator: max77686: Fix using wrong dev argument at various placesAxel Lin2013-01-26
| |/ | | | | | | | | | | | | | | | | Use &pdev->dev rather than iodev->dev for dev_err(). Use &pdev->dev rather than iodev->dev for devm_kzalloc() and of_regulator_match(), this fixes memory leak. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'regulator/fix/tps80031' into tmpMark Brown2013-01-28
|\ \
| * | regulator: tps80031: Use IS_ERR to check return value of regulator_register()Axel Lin2013-01-26
| |/ | | | | | | | | | | | | 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>
* / regulators: db8500: Fix compile failure for drivers/regulator/dbx500-prcmu.cSteven Rostedt2013-01-26
|/ | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'regulator/fix/s5m8767' into tmpMark Brown2013-01-14
|\
| * regulator: s5m8767: Fix probe failure due to stack corruptionInderpal Singh2012-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'regulator/fix/max8998' into tmpMark Brown2013-01-14
|\ \
| * | regulator: max8998: Ensure enough delay time for ↵Axel Lin2013-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | regulator: max8998: Use uV in voltage_map_descAxel Lin2013-01-08
| |/ | | | | | | | | | | | | | | | | | | | | 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
* | Merge remote-tracking branch 'regulator/fix/max8997' into tmpMark Brown2013-01-14
|\ \
| * | regulator: max8997: Use uV in voltage_map_descAxel Lin2013-01-08
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge remote-tracking branch 'regulator/fix/core' into tmpMark Brown2013-01-14
|\ \
| * | regulator: core: Fix comment for regulator_register()Axel Lin2013-01-03
| | | | | | | | | | | | | | | | | | | | | 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>
| * | regulator: core: Fix continuous_voltage_range case in ↵Axel Lin2012-12-24
| |/ | | | | | | | | | | | | | | | | | | | | 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>
* / Drivers: regulator: remove __dev* attributes.Greg Kroah-Hartman2013-01-03
|/ | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'regulator/topic/sm8767' into regulator-nextMark Brown2012-12-11
|\
| * regulator: s5m8767: Fix to work even if no DVS gpio presentAmit Daniel Kachhap2012-12-10
| | | | | | | | | | Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: s5m8767: Fix to read the first DVS register.Amit Daniel Kachhap2012-12-10
| | | | | | | | | | | | | | | | | | 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>
| * regulator: s5m8767: Fix to work when platform registers less regulatorsAmit Daniel Kachhap2012-12-10
| | | | | | | | | | Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'regulator/topic/change' into regulator-nextMark Brown2012-12-11
|\ \
| * | regulator: core: Fix logic to determinate if regulator can change voltageAxel Lin2012-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge branch 'topic/min' of ↵Mark Brown2012-12-11
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-change
* | \ \ Merge remote-tracking branch 'regulator/topic/gpio' into regulator-nextMark Brown2012-12-10
|\ \ \ \
| * | | | regulator: gpio-regulator: gpio_set_value should use cansleepLee Jones2012-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | regulator: gpio-regulator: Fix logical error in for() loopLee Jones2012-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge remote-tracking branch 'regulator/topic/wm831x' into regulator-nextMark Brown2012-12-09
|\ \ \ \ \
| * | | | | regulator: wm831x-dcdc: Add MODULE_ALIAS for wm831x-boostpAxel Lin2012-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | | regulator: wm831x-dcdc: Ensure selected voltage falls within requested rangeAxel Lin2012-12-02
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use DIV_ROUND_UP to ensure selected voltage won't less than min_uV due to integer truncation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | | | Merge remote-tracking branch 'regulator/topic/tps80031' into regulator-nextMark Brown2012-12-09
|\ \ \ \ \
| * | | | | regulator: tps80031: Convert tps80031_ldo_ops to linear_min_sel and ↵Axel Lin2012-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | list_voltage_linear Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | | regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed ↵Axel Lin2012-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regulators Implement list_voltage for fixed regulators, otherwise regulator_is_supported_voltage() returns 0. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | | regulator: tps80031: Trivial cleanupsAxel Lin2012-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch includes below cleanups: - Fix typo in comment - Fix showing wrong register in dev_err - Remove unnecessary rinfo variable - Add TPS80032 to MODULE_DESCRIPTION Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | | | | Merge remote-tracking branch 'regulator/topic/tps65910' into regulator-nextMark Brown2012-12-09
|\ \ \ \ \ \
| * | | | | | regulator: tps65910: fix BUG_ON() shown with vrtc regulatorAnilKumar Ch2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix BUG_ON() error if tps65910 VRTC regulator is used with out rdev->desc->volt_table data. Recent changes in regulator core driver which add support for "regulator_list_voltage_table" have BUG_ON() if regulator descriptor do not voltage table information. This patch adds the voltage table information to fix the issue. Signed-off-by: AnilKumar Ch <anilkumar@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | | | | | Merge remote-tracking branch 'regulator/topic/tps6586x' into regulator-nextMark Brown2012-12-09
|\ \ \ \ \ \ \