aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-07-02regulator: s2mps11: Fix buck7 and buck8 wrong voltagesKrzysztof Kozlowski1-2/+2
On S2MPS11 device, the buck7 and buck8 regulator voltages start at 750 mV, not 600 mV. Using wrong minimal value caused shifting of these regulator values by 150 mV (e.g. buck7 usually configured to v1.35 V was reported as 1.2 V). On most of the boards these regulators are left in default state so this was only affecting reported voltage. However if any driver wanted to change them, then effectively it would set voltage 150 mV higher than intended. Cc: <[email protected]> Fixes: cb74685ecb39 ("regulator: s2mps11: Add samsung s2mps11 regulator driver") Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-06-20regulator: s2mps11: Fix ERR_PTR dereference on GPIO lookup failureKrzysztof Kozlowski1-0/+1
If devm_gpiod_get_from_of_node() call returns ERR_PTR, it is assigned into an array of GPIO descriptors and used later because such error is not treated as critical thus it is not propagated back to the probe function. All code later expects that such GPIO descriptor is either a NULL or proper value. This later might lead to dereference of ERR_PTR. Only devices with S2MPS14 flavor are affected (other do not control regulators with GPIOs). Fixes: 1c984942f0a4 ("regulator: s2mps11: Pass descriptor instead of GPIO number") Cc: <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-16regulator: tps6507x: Fix boot regression due to testing wrong init_data pointerAxel Lin1-3/+3
A NULL init_data once incremented will lead to oops, fix it. Fixes: f979c08f7624 ("regulator: tps6507x: Convert to regulator core's simplified DT parsing code") Reported-by: Sekhar Nori <[email protected]> Signed-off-by: Axel Lin <[email protected]> Tested-by: Sekhar Nori <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-03regulator: core: simplify return value on suported_voltageJorge Ramirez-Ortiz1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-03regulator: da9xxx: Switch to SPDX identifierAxel Lin8-110/+36
Convert Dialog Semiconductor DA9xxx regulator drivers to SPDX identifier. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-03regulator: stm32-pwr: Remove unneeded .min_uV and .list_volageAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-03regulator: stm32-pwr: Remove unneeded *desc from struct stm32_pwr_regAxel Lin1-5/+3
Just use rdev->desc instead. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-03regulator: ab3100: Set fixed_uV instead of min_uV for fixed regulatorsAxel Lin1-4/+3
Slightly better readability by setting fixed_uV instead of min_uV. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-03regulator: ab3100: Constify regulator_ops and ab3100_regulator_descAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-03regulator: pv880x0: Switch to SPDX identifierAxel Lin6-72/+15
Convert Powerventure Semiconductor PV88060/PV88080/PV88090 regulator drivers to SPDX identifier. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-02regulator: hi6xxx: Switch to SPDX identifierAxel Lin3-42/+30
Convert HiSilicon hi6xxx PMIC drivers to SPDX identifier. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-02regulator: vexpress: Switch to SPDX identifierAxel Lin1-12/+3
Signed-off-by: Axel Lin <[email protected]> Acked-by: Sudeep Holla <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-05-02regulator: vexpress: Get rid of struct vexpress_regulatorAxel Lin1-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 <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: sky81452: Switch to SPDX identifierAxel Lin1-18/+6
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: sky81452: Constify sky81452_reg_opsAxel Lin1-1/+1
sky81452_reg_ops is never changed, make it const. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: sy8106a: Get rid of struct sy8106aAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: core: do not report EPROBE_DEFER as error but as debugJorge Ramirez-Ortiz1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: mt63xx: Switch to SPDX identifierAxel Lin5-56/+17
Convert MediaTek mt63xx PMIC drivers to SPDX identifier. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: fan53555: Switch to SPDX identifierAxel Lin1-14/+10
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: fan53555: Clean up unneeded fields from struct fan53555_device_infoAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: ltc3589: Switch to SPDX identifierAxel Lin1-18/+6
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: ltc3589: Get rid of struct ltc3589_regulatorAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-26regulator: ltc3589: Convert to use simplified DT parsingAxel Lin1-136/+58
Use regulator core's simplified DT parsing code to simplify the driver implementation. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-17regulator: wm8400: Switch to SPDX identifierAxel Lin1-13/+7
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-17regulator: wm8350: Switch to SPDX identifierAxel Lin1-13/+8
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-17regulator: wm831x: Switch to SPDX identifierAxel Lin3-36/+21
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-17regulator: arizona: Switch to SPDX identifierAxel Lin2-24/+14
Signed-off-by: Axel Lin <[email protected]> Acked-by: Richard Fitzgerald <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-17regulator: wm8994: Switch to SPDX identifierAxel Lin1-12/+7
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-17regulator: stm32-pwr: Fix return value check in stm32_pwr_regulator_probe()Wei Yongjun1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-17regulator: ready_mask_table[] can be statickbuild test robot1-3/+3
Fixes: 6cdae8173f67 ("regulator: Add support for stm32 power regulators") Signed-off-by: kbuild test robot <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-16regulator: tps80031: Switch to SPDX identifierAxel Lin1-24/+10
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-16regulator: tps80031: Constify regulator_ops and tps80031_dcdc_voltages arrayAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-16regulator: tps80031: Remove unused *rdev from struct tps80031_regulatorAxel Lin1-2/+0
The ri-rdev is assigend but not used, so remove it. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: Add support for stm32 power regulatorsPascal PAILLET-LME3-0/+198
Add support for 1V1 1V8 USB3V3 power regulators. Signed-off-by: Pascal Paillet <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15dt-bindings: regulator: Add stm32mp1 pwr regulatorsPascal PAILLET-LME1-0/+43
Document devicetree bindings for stm32mp1 pwr regulators. Signed-off-by: Pascal Paillet <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: max8998: Factor out struct voltage_map_descAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: max8998: Constify regulator_opsAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: tps6524x: Remove *rdev[N_REGULATORS] from struct tps6524xAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: tps6524x: Constify regulator_opsAxel Lin1-1/+1
The regulator_ops is never changed, make it const. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: tps65218: Convert to use regulator_get_current_limit_regmapAxel Lin1-29/+19
Use regulator_get_current_limit_regmap helper to save some code. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: ab8500: Remove *regulator from struct ab8500_regulator_infoAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: ab8500: Constify regulator_opsAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: ab8500-ext: Constify ab8500_ext_regulator_opsAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: ab8500-ext: Convert to use simplified DT parsingAxel Lin1-23/+5
Use regulator core's simplified DT parsing code to simplify the driver implementation. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-15regulator: ab8500-ext: Remove *rdev from struct ab8500_ext_regulator_infoAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-12regulator: dbx500-prcmu: Remove unused fields from struct dbx500_regulator_infoAxel Lin2-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-12regulator: db8500-prcmu: Convert to use simplified DT parsingAxel Lin1-97/+42
Use regulator core's simplified DT parsing code to simplify the driver implementation. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-12regulator: db8500-prcmu: Constify regulator_opsAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-11regulator: mcp16502: Remove setup_regulators functionAxel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-04-11regulator: mcp16502: Remove unneeded fields from struct mcp16502Axel Lin1-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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>