summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
Commit message (Collapse)AuthorAgeFilesLines
...
| * regulator: s2mpa01: Remove unused define for S2MPA01_REGULATOR_CNTAxel Lin2019-04-101-2/+0Star
| | | | | | | | | | | | | | | | The S2MPA01_REGULATOR_CNT is no longer used after converted to use simplified DT parsing. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: hi655x: Remove ctrl_mask field from struct hi655x_regulatorAxel Lin2019-04-101-10/+3Star
| | | | | | | | | | | | | | | | The rdev->desc->enable_mask setting is always the same as BIT(regulator->ctrl_mask), so just use rdev->desc->enable_mask instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: hi655x: Constify regulators arrayAxel Lin2019-04-101-1/+1
| | | | | | | | | | | | | | | | The regulators array should never need to be modified, make it const so compiler can put it to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: s2mpa01: Convert to use simplified DT parsingAxel Lin2019-04-081-29/+10Star
| | | | | | | | | | | | | | | | Use regulator core's simplified DT parsing code to simply the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: bd718x7: Use rdev_get_id() to get regulator idAxel Lin2019-04-081-2/+2
| | | | | | | | | | | | | | | | Use rdev_get_id() instead of directly access rdev->desc->id. While at it also remove unneeded init for ramp_value variable. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: twl: Constify regulator_opsAxel Lin2019-04-031-3/+3
| | | | | | | | | | | | | | | | These regulator_ops variables never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: lm363x: Constify regulator_opsAxel Lin2019-04-031-2/+2
| | | | | | | | | | | | | | | | | | The lm363x_boost_voltage_table_ops and lm363x_regulator_voltage_table_ops never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: lm363x: Use proper data type for regmap_read argumentsAxel Lin2019-04-031-2/+2
| | | | | | | | | | | | | | | | regmap_read() takes unsigned int reg and unsigned int *val arguments, use proper data type for these arguments. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: bcm590xx: Convert to use simplified DT parsingAxel Lin2019-04-021-103/+2Star
| | | | | | | | | | | | | | | | Use regulator core's simplified DT parsing code to simply the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: as3722: Slightly improve readabilityAxel Lin2019-04-011-79/+58Star
| | | | | | | | | | | | | | | | | | Add a local variable *desc to avoid too many change lines due to over 80 characters. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: as3722: Convert to use regulator_set/get_current_limit_regmapAxel Lin2019-04-011-152/+60Star
| | | | | | | | | | | | | | | | Use regulator_set/get_current_limit_regmap helpers to save some code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps6507x: Convert to regulator core's simplified DT parsing codeAxel Lin2019-04-011-88/+19Star
| | | | | | | | | | | | | | | | Use regulator core's simplified DT parsing code to simply the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps6507x: Remove unused *rdev[] from struct tps6507x_pmicAxel Lin2019-04-011-4/+0Star
| | | | | | | | | | | | | | | | This driver is using devm_regulator_register so no need to save *rdev for clean up. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps6507x: Constify tps6507x_pmic_opsAxel Lin2019-04-011-1/+1
| | | | | | | | | | | | | | | | The tps6507x_pmic_ops never need to be modified, make it const so compiler can put it to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: vctrl: Remove unneeded continue statementAxel Lin2019-04-011-3/+1Star
| | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: rc5t583: Get rid of struct rc5t583_regulatorAxel Lin2019-04-011-22/+3Star
| | | | | | | | | | | | | | | | | | | | | | The struct rc5t583_regulator only has 2 members, the *rdev is no longer used because this driver is using devm_regulator_register now. After remove *rdev, only *reg_info left. We can use struct rc5t583_regulator_info directly, so remove struct rc5t583_regulator. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: act8865: Constify regulator_opsAxel Lin2019-03-261-2/+2
| | | | | | | | | | | | | | | | The act8865_ops and act8865_ldo_ops never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: act8865: Convert to regulator core's simplified DT parsing codeAxel Lin2019-03-261-124/+19Star
| | | | | | | | | | | | | | | | | | | | Use regulator core's simplified DT parsing code to simply the driver implementation. With this conversion, also move the NULL test against pdata in act8865_get_regulator_data() to the caller. This makes it clear the code path to explicitly set init_data is for non-DT case only. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: sc2731: Constify regulatorsAxel Lin2019-03-261-1/+1
| | | | | | | | | | | | | | | | The regulators array should never need to be modified, make it const so compiler can put it to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: da9063: convert header to SPDXWolfram Sang2019-03-261-14/+8Star
| | | | | | | | | | | | | | Covnert the header of the source file to SPDX. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps65217: Constify regulator_opsAxel Lin2019-03-251-2/+2
| | | | | | | | | | | | | | | | These regulator_ops variables never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps65218: Constify regulator_opsAxel Lin2019-03-251-4/+4
| | | | | | | | | | | | | | | | These regulator_ops variables never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: uniphier: Fix build dependencyAxel Lin2019-03-251-1/+2
| | | | | | | | | | | | | | | | This driver does not use any syscon APIs, so remove MFD_SYSCON dependency. Select REGMAP_MMIO since this driver uses devm_regmap_init_mmio(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xBAxel Lin2019-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | selector 0xB (1011) should be 2.6V rather than 2.7V, fit ix. Table 5-4. LDOA1 Output Voltage Options VID Bits VOUT VID Bits VOUT VID Bits VOUT VID Bits VOUT 0000 1.35 0100 1.8 1000 2.3 1100 2.85 0001 1.5 0101 1.9 1001 2.4 1101 3.0 0010 1.6 0110 2.0 1010 2.5 1110 3.3 0011 1.7 0111 2.1 1011 2.6 1111 Not Used Fixes: d2a2e729a666 ("regulator: tps65086: Add regulator driver for the TPS65086 PMIC") Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps65217: Simplify linear range for selector 25-52Axel Lin2019-03-211-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | The original code separates the selector 25-52 into 2 ranges on purpose because DCDC1/DCDC3 only support up to 1.8V/1.5V in the old code. Both DCDC1 and DCDC3 support up to 3.3V since commit b4c2e158a1e1 ("regulator: tps65217: Allow DCDC1 and DCDC3 up to 3.3V"), so merge 25-30 and 31-52 ranges to one range. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps65132: Constify tps65132_regulator_ops and tps_regs_descAxel Lin2019-03-211-2/+2
| | | | | | | | | | | | | | | | The tps65132_regulator_ops and tps_regs_desc never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps65132: Remove unneeded fields from struct tps65132_regulatorAxel Lin2019-03-211-14/+11Star
| | | | | | | | | | | | | | These fields are not really need, remove them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: axp20x: Mark expected switch fall-throughsGustavo A. R. Silva2019-03-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/regulator/axp20x-regulator.c: In function ‘axp20x_set_dcdc_freq’: drivers/regulator/axp20x-regulator.c:1023:7: warning: this statement may fall through [-Wimplicit-fallthrough=] reg = AXP803_DCDC_FREQ_CTRL; drivers/regulator/axp20x-regulator.c:1025:2: note: here case AXP806_ID: ^~~~ drivers/regulator/axp20x-regulator.c: In function ‘axp20x_set_dcdc_workmode’: drivers/regulator/axp20x-regulator.c:1115:7: warning: this statement may fall through [-Wimplicit-fallthrough=] reg = AXP806_DCDC_MODE_CTRL2; drivers/regulator/axp20x-regulator.c:1121:2: note: here case AXP221_ID: ^~~~ Notice that in this particular case, I moved the whole comment "Fall through to the check below.", which contains the "Fall through" comment, at the bottom of the case, which is what GCC is expecting to find. Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: rn5t618: Constify regulator_descAxel Lin2019-03-201-4/+4
| | | | | | | | | | | | | | | | The regulator_desc never need to be modified, so define them as const as a hint to the compiler that they can go into .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: max8925: Convert to regulator core's simplified DT parsing codeAxel Lin2019-03-201-67/+9Star
| | | | | | | | | | | | | | | | Use regulator core's simplified DT parsing code to simply the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: of: Make regulator_of_get_init_node staticYueHaibing2019-03-201-2/+3
| | | | | | | | | | | | | | | | | | | | Fix sparse warning: drivers/regulator/of_regulator.c:374:20: warning: symbol 'regulator_of_get_init_node' was not declared. Should it be static? Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: axp20x: Use rdev_get_id at appropriate placesAxel Lin2019-03-191-9/+5Star
| | | | | | | | | | | | | | | | Use rdev_get_id() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: axp20x: Remove unneeded NULL test against rdevAxel Lin2019-03-191-3/+0Star
| | | | | | | | | | | | | | | | rdev won't be NULL in .enable callback. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: 88pm8607: Convert to regulator core's simplified DT parsing codeAxel Lin2019-03-191-34/+9Star
| | | | | | | | | | | | | | | | Use regulator core's simplified DT parsing code to simply the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: core: Fix application of "drop lockdep annotation in ↵Mark Brown2019-03-181-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drms_uA_update()" [The original commit was sent against -next but needed to be sent as a bugfix, however -next had some additional changes which needed to be reverted. Now everything is all in one branch applying the rest of the changes to fix up the merge issue -- broonie] commit e5e21f70bfd3 ("regulator: core: Take lock before applying system load") took the regulator lock before calling drms_uA_update() in order to silence a lockdep warning during regulator_register(). However, we are not supposed to need locks at this point as the regulator is in the process of being registered, so there should be no possibility of concurrent access. Instead, remove the unnecessary locking and simply drop the lockdep annotation, since it is no longer valid. Fixes: e5e21f70bfd3 ("regulator: core: Take lock before applying system load") Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: da9063: Convert to use regulator_set/get_current_limit_regmapAxel Lin2019-03-181-79/+28Star
| | | | | | | | | | | | | | | | Use regulator_set/get_current_limit_regmap helpers to save some code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Steve Twiss <stwiss@opensource.diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: da9062: Convert to use regulator_set/get_current_limit_regmapAxel Lin2019-03-181-93/+32Star
| | | | | | | | | | | | | | | | Use regulator_set/get_current_limit_regmap helpers to save some code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Steve Twiss <stwiss@opensource.diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: lp87565: Convert to use regulator_set/get_current_limit_regmapAxel Lin2019-03-181-40/+7Star
| | | | | | | | | | | | | | Use regulator_set/get_current_limit_regmap helpers to save some code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: lp87565: Fix missing register for LP87565_BUCK_0Axel Lin2019-03-181-1/+1
| | | | | | | | | | | | | | | | | | LP87565_BUCK_0 is missed, fix it. Fixes: f0168a9bf ("regulator: lp87565: Add support for lp87565 PMIC regulators") Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: mt6397: Use unsigned int for volt_tablesAxel Lin2019-03-181-8/+8
| | | | | | | | | | | | | | Make it consistent as .volt_table should be const unsigned int *. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: mt6380: Use unsigned int for volt_tablesAxel Lin2019-03-181-4/+4
| | | | | | | | | | | | | | Make it consistent as .volt_table should be const unsigned int *. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: mt6323: Use unsigned int for volt_tablesAxel Lin2019-03-181-10/+10
| | | | | | | | | | | | | | Make it consistent as .volt_table should be const unsigned int *. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: max77650: Use unsigned int for max77651_sbb1_regulator_volt_tableAxel Lin2019-03-181-1/+1
| | | | | | | | | | | | | | Make it consistent as .volt_table should be const unsigned int *. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: as3711: Remove struct as3711_regulator_info and as3711_regulatorAxel Lin2019-03-181-30/+7Star
| | | | | | | | | | | | | | | | This driver does not really need struct as3711_regulator_info and struct as3711_regulator, remove them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: cpcap: Convert to use of_device_get_match_dataAxel Lin2019-03-181-8/+4Star
| | | | | | | | | | | | | | Use of_device_get_match_data to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: cpcap: Remove unneeded init_data settingAxel Lin2019-03-181-3/+0Star
| | | | | | | | | | | | | | | | | | | | This driver is using regulator core's simplified DT parsing code, so regulator will call regulator_of_get_init_data() to get init_data. No need to set config.init_data. In additional, current code does not properly set the init_data setting, so just remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: as3722: Remove *rdevs[] from struct as3722_regulatorsAxel Lin2019-03-181-2/+0Star
| | | | | | | | | | | | | | | | | | Current code is using devm_regulator_register() so it is not necessary to save as3722_regs->rdevs[id] for clean up. The *rdevs[] is not used now, remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: da9052: Include linux/of.h to fix build warning for of_match_ptrAxel Lin2019-03-181-2/+0Star
| | | | | | | | | | | | | | | | | | | | Remove #ifdef CONFIG_OF guard so linux/of.h will be included when !CONFIG_OF. This fixes build warnings when !CONFIG_OF. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: da9055: Convert to regulator core's simplified DT parsing codeAxel Lin2019-03-151-61/+6Star
| | | | | | | | | | | | | | | | Use regulator core's simplified DT parsing code to simply the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: da9052: Convert to regulator core's simplified DT parsing codeAxel Lin2019-03-151-27/+6Star
| | | | | | | | | | | | | | | | Use regulator core's simplified DT parsing code to simply the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>