summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* regulator: core: simplify return value on suported_voltageJorge Ramirez-Ortiz2019-05-031-2/+2
| | | | | | | | | | | | | All the current clients of this API assume that 0 corresponds to a failure and non-zero to a pass therefore ignoring the need to handle a negative error code. This commit modifies the API to follow that standard since returning a negative (EINVAL) doesn't seem to provide enough value to justify the need to handle it. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: da9xxx: Switch to SPDX identifierAxel Lin2019-05-038-110/+36
| | | | | | | Convert Dialog Semiconductor DA9xxx regulator drivers to SPDX identifier. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: stm32-pwr: Remove unneeded .min_uV and .list_volageAxel Lin2019-05-031-2/+0
| | | | | | | | For fixed regulator, setting .n_voltages = 1 and .fixed_uV is enough, no need to set .min_uV and .list_volage. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: stm32-pwr: Remove unneeded *desc from struct stm32_pwr_regAxel Lin2019-05-031-5/+3
| | | | | | | Just use rdev->desc instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: ab3100: Set fixed_uV instead of min_uV for fixed regulatorsAxel Lin2019-05-031-4/+3
| | | | | | | Slightly better readability by setting fixed_uV instead of min_uV. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: ab3100: Constify regulator_ops and ab3100_regulator_descAxel Lin2019-05-031-7/+7
| | | | | | | | These regulator_ops variables and ab3100_regulator_desc array 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: pv880x0: Switch to SPDX identifierAxel Lin2019-05-036-72/+15
| | | | | | | | Convert Powerventure Semiconductor PV88060/PV88080/PV88090 regulator drivers to SPDX identifier. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: hi6xxx: Switch to SPDX identifierAxel Lin2019-05-023-42/+30
| | | | | | | Convert HiSilicon hi6xxx PMIC drivers to SPDX identifier. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: vexpress: Switch to SPDX identifierAxel Lin2019-05-021-12/+3
| | | | | | 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>
* regulator: vexpress: Get rid of struct vexpress_regulatorAxel Lin2019-05-021-31/+22
| | | | | | | | | | The *regdev and *regmap can be replaced by local variables in probe(). Only desc of struct vexpress_regulator is really need, so just use struct regulator_desc directly and remove struct vexpress_regulator. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: sky81452: Switch to SPDX identifierAxel Lin2019-04-261-18/+6
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: sky81452: Constify sky81452_reg_opsAxel Lin2019-04-261-1/+1
| | | | | | | sky81452_reg_ops is never changed, make it const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: sy8106a: Get rid of struct sy8106aAxel Lin2019-04-261-27/+13
| | | | | | | | All the fields in struct sy8106a are only used in sy8106a_i2c_probe(), so use local variables instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: core: do not report EPROBE_DEFER as error but as debugJorge Ramirez-Ortiz2019-04-261-2/+7
| | | | | | | | Temporary failures to get a regulator (EPROBE_DEFER) should be logged as debug information instead of errors. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: mt63xx: Switch to SPDX identifierAxel Lin2019-04-265-56/+17
| | | | | | | Convert MediaTek mt63xx PMIC drivers to SPDX identifier. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: fan53555: Switch to SPDX identifierAxel Lin2019-04-261-14/+10
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: fan53555: Clean up unneeded fields from struct fan53555_device_infoAxel Lin2019-04-261-19/+17
| | | | | | | | | The *regmap and *rdev can be replaced by local variables. The slew_rate is no longer used since commit dd7e71fbeefe ("regulator: fan53555: use set_ramp_delay to set the ramp up slew rate"). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: ltc3589: Switch to SPDX identifierAxel Lin2019-04-261-18/+6
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: ltc3589: Get rid of struct ltc3589_regulatorAxel Lin2019-04-261-38/+31
| | | | | | | | | After converting to use simplified DT parsing, the struct ltc3589_regulator only has a desc member. So let's remove struct ltc3589_regulator and use struct regulator_desc instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: ltc3589: Convert to use simplified DT parsingAxel Lin2019-04-261-136/+58
| | | | | | | | 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>
* regulator: wm8400: Switch to SPDX identifierAxel Lin2019-04-171-13/+7
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: wm8350: Switch to SPDX identifierAxel Lin2019-04-171-13/+8
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: wm831x: Switch to SPDX identifierAxel Lin2019-04-173-36/+21
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: arizona: Switch to SPDX identifierAxel Lin2019-04-172-24/+14
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: wm8994: Switch to SPDX identifierAxel Lin2019-04-171-12/+7
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: stm32-pwr: Fix return value check in stm32_pwr_regulator_probe()Wei Yongjun2019-04-171-2/+2
| | | | | | | | | | In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 6cdae8173f67 ("regulator: Add support for stm32 power regulators") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: ready_mask_table[] can be statickbuild test robot2019-04-171-3/+3
| | | | | | Fixes: 6cdae8173f67 ("regulator: Add support for stm32 power regulators") Signed-off-by: kbuild test robot <lkp@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: tps80031: Switch to SPDX identifierAxel Lin2019-04-161-24/+10
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: tps80031: Constify regulator_ops and tps80031_dcdc_voltages arrayAxel Lin2019-04-161-6/+6
| | | | | | | | These regulator_ops variables and tps80031_dcdc_voltages array 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: tps80031: Remove unused *rdev from struct tps80031_regulatorAxel Lin2019-04-161-2/+0
| | | | | | | The ri-rdev is assigend but not used, so remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: Add support for stm32 power regulatorsPascal PAILLET-LME2019-04-153-0/+198
| | | | | | | 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>
* dt-bindings: regulator: Add stm32mp1 pwr regulatorsPascal PAILLET-LME2019-04-151-0/+43
| | | | | | | Document devicetree bindings for stm32mp1 pwr regulators. Signed-off-by: Pascal Paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: max8998: Factor out struct voltage_map_descAxel Lin2019-04-151-238/+56
| | | | | | | | | | 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>
* regulator: max8998: Constify regulator_opsAxel Lin2019-04-151-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: tps6524x: Remove *rdev[N_REGULATORS] from struct tps6524xAxel Lin2019-04-151-5/+4
| | | | | | | | 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>
* regulator: tps6524x: Constify regulator_opsAxel Lin2019-04-151-1/+1
| | | | | | | 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>
* regulator: tps65218: Convert to use regulator_get_current_limit_regmapAxel Lin2019-04-151-29/+19
| | | | | | | 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>
* regulator: ab8500: Remove *regulator from struct ab8500_regulator_infoAxel Lin2019-04-151-6/+4
| | | | | | | | 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>
* regulator: ab8500: Constify regulator_opsAxel Lin2019-04-151-5/+5
| | | | | | | | 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: ab8500-ext: Constify ab8500_ext_regulator_opsAxel Lin2019-04-151-1/+1
| | | | | | | | 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>
* regulator: ab8500-ext: Convert to use simplified DT parsingAxel Lin2019-04-151-23/+5
| | | | | | | | 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>
* regulator: ab8500-ext: Remove *rdev from struct ab8500_ext_regulator_infoAxel Lin2019-04-151-11/+8
| | | | | | | | 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>
* regulator: dbx500-prcmu: Remove unused fields from struct dbx500_regulator_infoAxel Lin2019-04-122-9/+5
| | | | | | | | | 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>
* regulator: db8500-prcmu: Convert to use simplified DT parsingAxel Lin2019-04-121-97/+42
| | | | | | | | 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>
* regulator: db8500-prcmu: Constify regulator_opsAxel Lin2019-04-121-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: mcp16502: Remove setup_regulators functionAxel Lin2019-04-111-26/+11
| | | | | | | | | 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>
* regulator: mcp16502: Remove unneeded fields from struct mcp16502Axel Lin2019-04-111-24/+16
| | | | | | | | | | 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>
* regulator: vexpress: Constify regulator_opsAxel Lin2019-04-111-2/+2
| | | | | | | | | 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>
* regulator: hi6421: Convert to use simplified DT parsingAxel Lin2019-04-111-130/+78
| | | | | | | | 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: anatop: Remove unneeded fields from struct anatop_regulatorAxel Lin2019-04-101-36/+27
| | | | | | | | | | | 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>