summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-21regulator: qcom-rpmh: Cleanup terminator line commasBhupesh Sharma
Cleanup the qcom-rpmh regulator driver to remove comma(s) at the end of the terminator line(s). Cc: Mark Brown <broonie@kernel.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Link: https://lore.kernel.org/r/20210617051712.345372-4-bhupesh.sharma@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-16regulator: fixed: use dev_err_probe for gpioRouven Czerwinski
Instead of returning the the PTR_ERR directly, use dev_err_probe which will also correctly set the deferred probe reason in /sys/kernel/debug/deferred_devices, making it easier to debug missing devices on the system. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Link: https://lore.kernel.org/r/20210616125331.153414-1-r.czerwinski@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-16regulator: sy7636a: Use rdev_get_drvdata at proper placeAxel Lin
At the context with *rdev, use rdev_get_drvdata() is more intuitive. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Alistair Francis <alistair@alistair23.me> Link: https://lore.kernel.org/r/20210616034458.3499522-3-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-16regulator: sy7636a: Make regulator_desc static constAxel Lin
It's only used in this file and never changed, make it static const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Alistair Francis <alistair@alistair23.me> Link: https://lore.kernel.org/r/20210616034458.3499522-2-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-16regulator: sy7636a: Add terminating entry for platform_device_id tableAxel Lin
The platform_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Alistair Francis <alistair@alistair23.me> Link: https://lore.kernel.org/r/20210616034458.3499522-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-16regulator: rt6160: Fix setting suspend voltageAxel Lin
The vsel active level is for the normal voltage, the opposite level is the suspend voltage. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/20210616011816.3479406-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15regulator: mt6315: Fix checking return value of devm_regmap_init_spmi_extAxel Lin
devm_regmap_init_spmi_ext() returns ERR_PTR() on error. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210615132934.3453965-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15regulator: sy7636a: Initial commitAlistair Francis
Initial support for the Silergy SY7636A-regulator Power Management chip. Signed-off-by: Alistair Francis <alistair@alistair23.me> Link: https://lore.kernel.org/r/20210615103400.946-3-alistair@alistair23.me Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15regulator: rt6160: Remove vsel_active_low from struct rt6160_privAxel Lin
Use a local variable instead is enough, this simplifies the code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210615103947.3387994-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14regulator: hi6421v600: Use regulator_map_voltage_ascendAxel Lin
All the voltage tables have entries in ascendant order, so use regulator_map_voltage_ascend to speed up the mapping. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210610134128.2477821-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14regulator: rt6160: Remove dummy line and add module descriptionChiYuan Huang
Remove dummy line and add module description. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1623335910-5385-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14regulator: rt6160: Convert to use regulator_set_ramp_delay_regmapAxel Lin
Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210603093809.1108629-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14Merge tag 'for-5.14-regulator' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into regulator-5.14 regulator: Changes for v5.14-rc1 This adds regulator_sync_voltage_rdev(), which is used as a dependency for new Tegra power domain code.
2021-06-08regulator: fan53880: Fix vsel_mask setting for FAN53880_BUCKAxel Lin
According to the datasheet: REGISTER DETAILS − 0x02 BUCK, BUCK_OUT is BIT0 ~ BIT7. So vsel_mask for FAN53880_BUCK should be 0xFF. Fixes: e6dea51e2d41 ("regulator: fan53880: Add initial support") Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210607142907.1599905-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08regulator: bd71815: Get rid of struct bd71815_pmicAxel Lin
The content of bd71815_regulators is never changed, no need to duplicate it, thus remove descs[BD71815_REGULATOR_CNT]. The *regmap, *dev and *rdev[BD71815_REGULATOR_CNT] are not really needed. The *gps is unused. Thus the struct bd71815_pmic can be removed. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/20210607143002.1600017-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08regulator: ltc3589: Convert to use regulator_set_ramp_delay_regmapAxel Lin
Use regulator_set_ramp_delay_regmap instead of open-coded LTC3589_LINEAR_REG() no longer call LTC3589_REG() now. Only LTC3589_LINEAR_REG() needs to set go_bit, thus remove go_bit parameter from LTC3589_REG() macro. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210604115803.1260976-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07regulator: mt6359: Get rid of linear_range tablesAxel Lin
The MT6359_BUCK and MT6359_LDO_LINEAR macros setup both linear settings (min_uV, uV_step, linear_min_sel) and linar_range (linear_ranges, n_linear_ranges) settings. All the linear range tables actually only has one entry. Let's simplify it by using linear instead of linear range. The linear_min_sel setting is 0 for all cases, remove it from the macros. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210606065052.1417111-3-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07regulator: mt6359: Use unsigned int for volt_tablesAxel Lin
The regulator_desc expects "const unsigned int *volt_table", thus use unsigned int instead of u32. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210606065052.1417111-2-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07regulator: mt6358: Use unsigned int for volt_tablesAxel Lin
The regulator_desc expects "const unsigned int *volt_table", thus use unsigned int instead of u32. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210606065052.1417111-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07regulator: max77686: Convert to use regulator_set_ramp_delay_regmapAxel Lin
Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210605013424.1298773-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07Merge tag 'tb-mfd-regulator-rtc-v5.14' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into regulator-5.14 Immutable branch between MFD, Regulator and RTC due for the v5.14 merge window
2021-06-04regulator: fan53555: add tcs4526Rudi Heitbaum
For rk3399pro boards the tcs4526 regulator supports the vdd_gpu regulator. The tcs4526 regulator has a chip id of <0>. Add the compatibile tcs,tcs4526 without this patch, the dmesg output is: fan53555-regulator 0-0010: Chip ID 0 not supported! fan53555-regulator 0-0010: Failed to setup device! fan53555-regulator: probe of 0-0010 failed with error -22 with this patch, the dmesg output is: vdd_gpu: supplied by vcc5v0_sys The regulators are described as: - Dedicated power management IC TCS4525 - Lithium battery protection chip TCS4526 This has been tested with a Radxa Rock Pi N10. Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com> Link: https://lore.kernel.org/r/20210602112943.GA119@5f9be87369f8 Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03regulator: rt6245: Add support for Richtek RT6245ChiYuan Huang
Richtek RT6245 is a high-performance, synchronous step-down converter that can deliver up to 14A output current with an input supply voltage range of 4.5V to 17V. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1622699844-19203-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03regulator: rt6245: Add the binding document for Richtek RT6245ChiYuan Huang
Add the binding document for Richtek RT6245. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/1622699844-19203-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03regulator: bd9576: Constify the voltage tablesAxel Lin
Also use unsigned int instead of int for the voltage tables. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210525100405.2506483-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03regulator: fan53555: Convert to use regulator_set_ramp_delay_regmapAxel Lin
Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210525124017.2550029-2-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03regulator: fan53555: Fix missing slew_reg/mask/shift settings for FAN53526Axel Lin
The di->slew_reg/di->slew_mask/di->slew_shift was not set in current code, fix it. Fixes: f2a9eb975ab2 ("regulator: fan53555: Add support for FAN53526") Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210525124017.2550029-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03regulator: max77802: Convert to use regulator_set_ramp_delay_regmapAxel Lin
Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210523072320.2174443-2-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03regulator: max77802: Remove .set_ramp_delay from max77802_buck_dvs_opsAxel Lin
max77802_set_ramp_delay_2bit() returns -EINVAL when id > MAX77802_BUCK4. This was a leftover in commit b0615f1da543 ("regulator: max77802: Split regulator operations for BUCKs"). Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210523072320.2174443-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-02regulator: userspace-consumer: use DEVICE_ATTR_RO/RW macroZhen Lei
Use DEVICE_ATTR_RO/RW macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20210602080526.11117-1-thunder.leizhen@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-02regulator: rt6160: Add support for Richtek RT6160ChiYuan Huang
Add support for Richtek RT6160 voltage regulator. It can provide up to 3A output current within the adjustable voltage from 2025mV to 5200mV. It integrate a buckboost converter to support wide input voltage range from 2200mV to 5500mV. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1622611906-2403-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-02regulator: rt6160: Add DT binding document for Richtek RT6160ChiYuan Huang
Add DT binding document for Richtek RT6160 voltage regulator. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/1622611906-2403-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-02regulator: core: Use DEVICE_ATTR_RO macroYueHaibing
Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20210529115226.25376-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01regulator: mt6359: Add support for MT6359P regulatorHsin-Hsiung Wang
The MT6359P is a eco version for MT6359 regulator. We add support based on MT6359 regulator driver. Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01regulator: mt6359: Add support for MT6359 regulatorWen Su
The MT6359 is a regulator found on boards based on MediaTek MT6779 and probably other SoCs. It is a so called pmic and connects as a slave to SoC using SPI, wrapped inside the pmic-wrapper. Signed-off-by: Wen Su <wen.su@mediatek.com> Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01mfd: Add support for the MediaTek MT6359 PMICHsin-Hsiung Wang
This adds support for the MediaTek MT6359 PMIC. This is a multifunction device with the following sub modules: - Codec - Interrupt - Regulator - RTC It is interfaced to the host controller using SPI interface by a proprietary hardware called PMIC wrapper or pwrap. MT6359 MFD is a child device of the pwrap. Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01dt-bindings: regulator: Add document for MT6359 regulatorHsin-Hsiung Wang
add dt-binding document for MediaTek MT6359 PMIC Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01dt-bindings: mfd: Add compatible for the MediaTek MT6359 PMICHsin-Hsiung Wang
This adds compatible for the MediaTek MT6359 PMIC. Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01rtc: mt6397: refine RTC_TC_MTHHsin-Hsiung Wang
This patch adds RTC_TC_MTH_MASK to support new chips. Signed-off-by: Yuchen Huang <yuchen.huang@mediatek.com> Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01mfd: mt6358: Refine interrupt codeHsin-Hsiung Wang
This patch refines the interrupt related code to support new chips. Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01regulator: mcp16502: Convert to use regulator_set_ramp_delay_regmapAxel Lin
Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210526125026.82549-2-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01regulator: mcp16502: Convert to use .probe_newAxel Lin
Use the new .probe_new for mcp16502. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210526125026.82549-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01regulator: bd70528: Drop BD70528 supportMatti Vaittinen
The only known BD70528 use-cases are such that the PMIC is controlled from separate MCU which is not running Linux. I am not aware of any Linux driver users. Furthermore, it seems there is no demand for this IC. Let's ease the maintenance burden and drop the driver. We can always add it back if there is sudden need for it. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/d7271362129edceebc512b49efed9ee7c3efcb6a.1622116622.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01regulator: lp8755: Convert to use regulator_set_ramp_delay_regmapAxel Lin
Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210527144248.247992-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01regulator: mt6315: Don't ignore devm_regulator_register failureAxel Lin
Also use dev_err instead of dev_notice for messages in error conditions. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210530020543.418634-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01regulator: pca9450: Convert to use regulator_set_ramp_delay_regmapAxel Lin
Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/20210526122408.78156-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01regulator: core: Add regulator_sync_voltage_rdev()Dmitry Osipenko
Some NVIDIA Tegra devices use a CPU soft-reset method for the reboot and in this case we need to restore the coupled voltages to the state that is suitable for hardware during boot. Add new regulator_sync_voltage_rdev() helper which is needed by regulator drivers in order to sync voltage of a coupled regulators. Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-05-27regulator: bd71815: fix platform_no_drv_owner.cocci warningsZou Wei
./drivers/regulator/bd71815-regulator.c:644:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zou Wei <zou_wei@huawei.com> Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Message-Id: <1622109244-54739-1-git-send-email-zou_wei@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-26regulator: rk808: Convert to use regulator_set_ramp_delay_regmapAxel Lin
Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Message-Id: <20210525141203.2562884-1-axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-25regulator: rt4831: Add missing .owner field in regulator_descAxel Lin
Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin <axel.lin@ingics.com> Message-Id: <20210524123735.2363676-1-axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>