summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-04-15regulator: Add support for stm32 power regulatorsPascal PAILLET-LME
Add support for 1V1 1V8 USB3V3 power regulators. Signed-off-by: Pascal Paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-15dt-bindings: regulator: Add stm32mp1 pwr regulatorsPascal PAILLET-LME
Document devicetree bindings for stm32mp1 pwr regulators. Signed-off-by: Pascal Paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-15regulator: max8998: Factor out struct voltage_map_descAxel Lin
The struct voltage_map_desc is used for storing min/max/step fileds, and then setup the min_uV, uV_step and n_voltages fields for regulator_desc. Introduce MAX8998_LINEAR_REG/MAX8998_OTHERS_REG macro to setup these filds directly in regulator_desc to simplify the code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-15regulator: max8998: Constify regulator_opsAxel Lin
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>
2019-04-15regulator: tps6524x: Remove *rdev[N_REGULATORS] from struct tps6524xAxel Lin
Current code is using devm_regulator_register() so we don't need to store *rdev for clean up, use a local variable instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-15regulator: tps6524x: Constify regulator_opsAxel Lin
The regulator_ops is never changed, make it const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-15regulator: tps65218: Convert to use regulator_get_current_limit_regmapAxel Lin
Use regulator_get_current_limit_regmap helper to save some code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-15regulator: ab8500: Remove *regulator from struct ab8500_regulator_infoAxel Lin
Current code is using devm_regulator_register() so we don't need to save *regulator for clean up, use a local variable instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-15regulator: ab8500: Constify regulator_opsAxel Lin
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>
2019-04-15regulator: ab8500-ext: Constify ab8500_ext_regulator_opsAxel Lin
ab8500_ext_regulator_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>
2019-04-15regulator: ab8500-ext: Convert to use simplified DT parsingAxel Lin
Use regulator core's simplified DT parsing code to simplify the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-15regulator: ab8500-ext: Remove *rdev from struct ab8500_ext_regulator_infoAxel Lin
Current code is using devm_regulator_register() so we don't need to save *rdev for clean up, use a local variable instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-12regulator: dbx500-prcmu: Remove unused fields from struct dbx500_regulator_infoAxel Lin
The *dev is assigned but not used, remove it. Current driver is using devm_regulator_register(), so no neeed to save *rdev for clean up. Use a local variable instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-12regulator: db8500-prcmu: Convert to use simplified DT parsingAxel Lin
Use regulator core's simplified DT parsing code to simplify the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-12regulator: db8500-prcmu: Constify regulator_opsAxel Lin
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>
2019-04-11regulator: mcp16502: Remove setup_regulators functionAxel Lin
It seems a little bit odd current code pass struct regulator_config rather than a pointer to setup_regulators. The setup_regulators is so simple and only has one caller, so remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-11regulator: mcp16502: Remove unneeded fields from struct mcp16502Axel Lin
At the context with rdev, we can use rdev->regmap instead of mcp->rmap. The *rdev[NUM_REGULATORS] is not required because current code uses devm_regulator_register() so we don't need to store *rdev for clean up paths. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-11regulator: vexpress: Constify regulator_opsAxel Lin
vexpress_regulator_ops_ro and vexpress_regulator_ops are never changed, make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-11regulator: hi6421: Convert to use simplified DT parsingAxel Lin
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>
2019-04-10regulator: anatop: Remove unneeded fields from struct anatop_regulatorAxel Lin
These fields are only used in anatop_regulator_probe() so use local variables instead. The *initdata is not used so can be removed. The *anatop is renamed to *regmap for better readability. Use u32 instead of int for the variables used as third argument of of_property_read_u32(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-10regulator: s2mpa01: Remove unused define for S2MPA01_REGULATOR_CNTAxel Lin
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>
2019-04-10regulator: hi655x: Remove ctrl_mask field from struct hi655x_regulatorAxel Lin
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>
2019-04-10regulator: hi655x: Constify regulators arrayAxel Lin
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>
2019-04-08regulator: s2mpa01: Convert to use simplified DT parsingAxel Lin
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>
2019-04-08regulator: bd718x7: Use rdev_get_id() to get regulator idAxel Lin
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>
2019-04-08ASoC: ab8500: add range to usleep_rangeNicholas Mc Guire
Providing a range for usleep_range() allows the hrtimer subsystem to coalesce timers - as this delay has no upper limit anyway (interrupts or context switch is possible) it should not hurt to extend this from 2 to 2-4 milliseconds. Signed-off-by: Nicholas Mc Guire <hofrat@opentech.at> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-03regulator: twl: Constify regulator_opsAxel Lin
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>
2019-04-03regulator: lm363x: Constify regulator_opsAxel Lin
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>
2019-04-03regulator: lm363x: Use proper data type for regmap_read argumentsAxel Lin
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>
2019-04-02regulator: bcm590xx: Convert to use simplified DT parsingAxel Lin
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>
2019-04-01regulator: as3722: Slightly improve readabilityAxel Lin
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>
2019-04-01regulator: as3722: Convert to use regulator_set/get_current_limit_regmapAxel Lin
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>
2019-04-01regulator: tps6507x: Convert to regulator core's simplified DT parsing codeAxel Lin
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>
2019-04-01regulator: tps6507x: Remove unused *rdev[] from struct tps6507x_pmicAxel Lin
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>
2019-04-01regulator: tps6507x: Constify tps6507x_pmic_opsAxel Lin
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>
2019-04-01regulator: vctrl: Remove unneeded continue statementAxel Lin
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>
2019-04-01regulator: rc5t583: Get rid of struct rc5t583_regulatorAxel Lin
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>
2019-03-26regulator: act8865: Constify regulator_opsAxel Lin
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>
2019-03-26regulator: act8865: Convert to regulator core's simplified DT parsing codeAxel Lin
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>
2019-03-26regulator: sc2731: Constify regulatorsAxel Lin
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>
2019-03-26regulator: da9063: convert header to SPDXWolfram Sang
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>
2019-03-25regulator: tps65217: Constify regulator_opsAxel Lin
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>
2019-03-25regulator: tps65218: Constify regulator_opsAxel Lin
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>
2019-03-25regulator: uniphier: Fix build dependencyAxel Lin
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>
2019-03-21regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xBAxel Lin
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>
2019-03-21regulator: add regulator_get_linear_step() stub helperArnd Bergmann
The regulator header has empty inline functions for most interfaces, but not regulator_get_linear_step(), which has just grown a user that does not depend on regulators otherwise: drivers/clk/tegra/clk-tegra124-dfll-fcpu.c: In function 'get_alignment_from_regulator': drivers/clk/tegra/clk-tegra124-dfll-fcpu.c:555:19: error: implicit declaration of function 'regulator_get_linear_step'; did you mean 'regulator_get_drvdata'? [-Werror=implicit-function-declaration] align->step_uv = regulator_get_linear_step(reg); ^~~~~~~~~~~~~~~~~~~~~~~~~ regulator_get_drvdata cc1: all warnings being treated as errors scripts/Makefile.build:278: recipe for target 'drivers/clk/tegra/clk-tegra124-dfll-fcpu.o' failed Add the missing stub along the others. Fixes: b3cf8d069505 ("clk: tegra: dfll: CVB calculation alignment with the regulator") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-21regulator: tps65217: Simplify linear range for selector 25-52Axel Lin
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>
2019-03-21regulator: tps65132: Constify tps65132_regulator_ops and tps_regs_descAxel Lin
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>
2019-03-21regulator: tps65132: Remove unneeded fields from struct tps65132_regulatorAxel Lin
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>
2019-03-20regulator: axp20x: Mark expected switch fall-throughsGustavo A. R. Silva
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>