summaryrefslogtreecommitdiffstats
path: root/drivers/regulator (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'regulator/for-5.10' into regulator-nextMark Brown2020-10-0559-585/+2692
|\
| * regulator: bd9576: Fix printMatti Vaittinen2020-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | The print in probe is done using pr_info. Correct print call would be dev_dbg because: - Severity should really be dbg - The dev pointer is given as first argument Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/c4f55add237455555df0597c72052022f7a669f6.1601885841.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: qcom_smd: add pm8953 regulatorsVladimir Lypak2020-10-051-0/+54
| | | | | | | | | | | | | | | | | | | | The PM8953 is commonly used on board with MSM8953 SoCs or its variants: APQ8053, SDM(SDA)450 and SDM(SDA)632. It provides 7 SMPS and 23 LDO regulators. Signed-off-by: Vladimir Lypak <junak.pub@gmail.com> Link: https://lore.kernel.org/r/20201004083413.324351-1-junak.pub@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: Make constraint debug processing conditional on DEBUGGeert Uytterhoeven2020-10-051-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If debugging is disabled, print_constraints() does not print the actual constraints, but still performs some processing and string formatting, only to throw away the result later. Fix this by moving all constraint debug processing to a separate function, and replacing it by a dummy when debugging is disabled. This reduces kernel size by almost 800 bytes (on arm/arm64). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20201005131546.22448-1-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
| * Merge series "Support for PM660/PM660L SPMI and SMD regulators" from ↵Mark Brown2020-10-013-2/+222
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kholk11@gmail.com AngeloGioacchino Del Regno <kholk11@gmail.com>: From: AngeloGioacchino Del Regno <kholk11@gmail.com> This patch series enables support for the regulators as found in the PM660 and PM660L PMICs. While at it, and to make them work, along with other regulators for other qcom PMICs, enlarge the maximum property name length in the regulator core, so that we're able to correctly parse the supply parents, which have got very long names (details in patch 1/5). This patch series has been tested against the following devices: - Sony Xperia XA2 Ultra (SDM630 Nile Discovery) - Sony Xperia 10 (SDM630 Ganges Kirin) - Sony Xperia 10 Plus (SDM636 Ganges Mermaid) AngeloGioacchino Del Regno (7): regulator: core: Enlarge max OF property name length to 64 chars regulator: qcom_spmi: Add support for new regulator types regulator: qcom_spmi: Add PM660/PM660L regulators regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries regulator: qcom_smd: Add PM660/PM660L regulator support mfd: qcom-spmi-pmic: Add support for PM660/PM660L regulator: dt-bindings: Document the PM660/PM660L PMICs entries .../regulator/qcom,smd-rpm-regulator.yaml | 7 ++ .../regulator/qcom,spmi-regulator.txt | 31 +++++ drivers/mfd/qcom-spmi-pmic.c | 4 + drivers/regulator/core.c | 4 +- drivers/regulator/qcom_smd-regulator.c | 113 ++++++++++++++++++ drivers/regulator/qcom_spmi-regulator.c | 107 +++++++++++++++++ include/linux/soc/qcom/smd-rpm.h | 4 + 7 files changed, 268 insertions(+), 2 deletions(-) -- 2.28.0
| | * regulator: qcom_smd: Add PM660/PM660L regulator supportAngeloGioacchino Del Regno2020-10-011-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PM660 and PM660L are a very very common PMIC combo, found on boards using the SDM630, SDM636, SDM660 (and SDA variants) SoC. PM660 provides 6 SMPS and 19 LDOs (of which one is unaccesible), while PM660L provides 5 SMPS (of which S3 and S4 are combined), 10 LDOs and a Buck-or-Boost (BoB) regulator. The PM660L IC also provides other regulators that are very specialized (for example, for the display) and will be managed in the other appropriate drivers (for example, labibb). Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com> Link: https://lore.kernel.org/r/20200926125549.13191-6-kholk11@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * regulator: qcom_spmi: Add PM660/PM660L regulatorsAngeloGioacchino Del Regno2020-10-011-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PM660 PMIC is very often paired with the PM660L option on SDM630/663/660 (and SDA variants) boards. The PM660 has 11 "660" LDOs (2 NMOS, 9 PMOS) and 7 HT LDOs (4 NMOS, 3 PMOS) and a quirk: the L4 regulator is unaccessible or does not exist on the PMIC. The PM660L has 8 "660" LDOs (1 NMOS, 7 PMOS) and 2 HT NMOS LDOs. Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com> Link: https://lore.kernel.org/r/20200926125549.13191-4-kholk11@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * regulator: qcom_spmi: Add support for new regulator typesAngeloGioacchino Del Regno2020-10-011-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the support for some regulator types that are missing in this driver, such as the ht nmos-ldo, ht-lv nmos-ldo and new gen n/pmos-ldo, all belonging to the FTSMPS426 register layout. This is done in preparation for adding support for the PM660 and PM660L PMICs. Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com> Link: https://lore.kernel.org/r/20200926125549.13191-3-kholk11@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * regulator: core: Enlarge max OF property name length to 64 charsAngeloGioacchino Del Regno2020-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some regulator drivers may be defining very long names: this is the case with the qcom_smd and qcom_spmi regulators, where we need to parse the regulator parents from DT. For clarity, this is an example: { "l13a", QCOM_SMD_RPM_LDOA, 13, &pm660_ht_lvpldo, "vdd_l8_l9_l10_l11_l12_l13_l14" }, pm660-regulators { ... vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04> ... }; Now, with a 32 characters limit, the function is trying to parse, exactly, "vdd_l8_l9_l10_l11_l12_l13_l14-s" (32 chars) instead of the right one, which is 37 chars long in this specific case. ... And this is not only the case with PM660/PM660L, but also with PMA8084, PM8916, PM8950 and others that are not implemented yet. The length of 64 chars was chosen based on the longest parsed property name that I could find, which is in PM8916, and would be 53 characters long. At that point, rounding that to 64 looked like being the best idea. Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com> Link: https://lore.kernel.org/r/20200926125549.13191-2-kholk11@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: qcom: labibb: Constify static structsRikard Falkeborn2020-10-011-4/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of qcom_labibb_ops is to assign it to the ops field in the regulator_desc struct, which is a const pointer. The only usage of pmi8998_lab_desc and pmi8998_ibb_desc is to assign their address to the desc field in the labibb_regulator_data struct which can be made const, since it is only copied into the desc field in the labbibb_regulator_data struct. This struct is modified, but that's a copy of the static one. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200930162602.18583-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: tps65910: use regmap accessorsMichał Mirosław2020-10-011-62/+63
| | | | | | | | | | | | | | | | | | Use regmap accessors directly for register manipulation - removing one layer of abstraction. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/e82886d0f8f5131c9fccf2a17e3a15acce507d6f.1601164493.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: rtmv20: Add missing regcache cache only before marked as dirtyChiYuan Huang2020-09-301-0/+1
| | | | | | | | | | | | | | | | Add missing regcache cache only before masked as dirty. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1601461132-15251-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: rtmv20: Update DT binding document and property name parsingChiYuan Huang2020-09-301-16/+20
| | | | | | | | | | | | | | | | | | | | | | 1. Add vendor suffix to all proprietary properties. 2. Fix typo. 3. Change lsw to normal property, not pattern property. 4. Due to item 1, modify source code for property parsing. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1601460480-4259-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * Merge series "regulator: debugging aids" from Michał Mirosław ↵Mark Brown2020-09-281-55/+69
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <mirq-linux@rere.qmqm.pl>: Three simple patches to aid in debugging regulators. Michał Mirosław (3): regulator: print state at boot regulator: print symbolic errors in kernel messages regulator: resolve supply after creating regulator drivers/regulator/core.c | 124 ++++++++++++++++++++++----------------- 1 file changed, 69 insertions(+), 55 deletions(-) -- 2.20.1
| | * regulator: resolve supply after creating regulatorMichał Mirosław2020-09-281-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new regulator its supply cannot create the sysfs link because the device is not yet published. Remove early supply resolving since it will be done later anyway. This makes the following error disappear and the symlinks get created instead. DCDC_REG1: supplied by VSYS VSYS: could not add device link regulator.3 err -2 Note: It doesn't fix the problem for bypassed regulators, though. Fixes: 45389c47526d ("regulator: core: Add early supply resolution for regulators") Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/ba09e0a8617ffeeb25cb4affffe6f3149319cef8.1601155770.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
| | * regulator: print symbolic errors in kernel messagesMichał Mirosław2020-09-281-45/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change all error-printing messages to include error name via %pe instead of numeric error or nothing. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/1dcf25f39188882eb56918a9aa281ab17b792aa5.1601155770.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
| | * regulator: print state at bootMichał Mirosław2020-09-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Make the initial state of the regulator shown when debugging. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/53c4f3d394d68f0989174f89e3b0882cebbbd787.1601155770.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: rtmv20: Adds support for Richtek RTMV20 load switch regulatorChiYuan Huang2020-09-283-0/+402
| |/ | | | | | | | | | | | | | | Add support for Richtek RTMV20 load switch regulator. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1601277584-5526-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: s5m8767: initialize driver via module_platform_driverKrzysztof Kozlowski2020-09-221-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | The driver was using subsys_initcall() because in old times deferred probe was not supported everywhere and specific ordering was needed. Since probe deferral works fine and specific ordering is discouraged (hides dependencies between drivers and couples their boot order), the driver can be converted to regular module_platform_driver. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200921203616.19623-1-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: enable compile testing for Maxim and Samsung PMIC driversKrzysztof Kozlowski2020-09-221-9/+9
| | | | | | | | | | | | | | | | | | | | | | Most of Maxim and Samsung PMIC/MUIC regulator drivers can be compile tested to increase build coverage. This allows to build them on configurations without I2C (as I2C is required by dependency - parent MFD driver). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200920214107.6299-1-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: fix indentation issueColin Ian King2020-09-221-1/+1
| | | | | | | | | | | | | | | | | | There is a return statement that is indented with an extra space, fix this by removing it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200920142454.33352-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: unexport regulator_lock/unlock()Michał Mirosław2020-09-211-4/+2
| | | | | | | | | | | | | | | | | | | | regulator_lock/unlock() was used only to guard regulator_notifier_call_chain(). As no users remain, make the functions internal. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/d3381aabd2632aff5e7b839d55868bec6e85c811.1600550732.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
| * Merge series "Support ROHM BD9576MUF and BD9573MUF PMICs" from Matti ↵Mark Brown2020-09-177-7/+355
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vaittinen <matti.vaittinen@fi.rohmeurope.com>: Initial support for ROHM BD9576MUF and BD9573MUF PMICs. These PMICs are primarily intended to be used to power the R-Car family processors. BD9576MUF includes some additional safety features the BD9573MUF does not have. This initial version of drivers does not utilize these features and for now the SW behaviour is identical. Please note that this version of drivers is only tested on BD9576MUF but according to the data-sheets the relevant parts of registers should be same so drivers should also work on BD9573MUF. This patch series includes MFD, watchdog and regulator drivers with basic functionality such as: - Enabling and pinging the watchdog - configuring watchog timeout / window from device-tree - reading regulator states/voltages - enabling/disabling VOUT1 (VD50) when control mode B is used. This patch series does not bring interrupt support. BD9576MUF and BD9573MUF are designed to keep the IRQ line low for whole duration of error condition. IRQ can't be 'acked'. So proper IRQ support would require some IRQ limiter implementation (delayed unmask?) in order to not hog the CPU. --- Matti Vaittinen (6): dt_bindings: mfd: Add ROHM BD9576MUF and BD9573MUF PMICs dt_bindings: regulator: Add ROHM BD9576MUF and BD9573MUF PMICs mfd: Support ROHM BD9576MUF and BD9573MUF wdt: Support wdt on ROHM BD9576MUF and BD9573MUF regulator: Support ROHM BD9576MUF and BD9573MUF MAINTAINERS: Add ROHM BD9576MUF and BD9573MUF drivers .../bindings/mfd/rohm,bd9576-pmic.yaml | 129 +++++++ .../regulator/rohm,bd9576-regulator.yaml | 33 ++ MAINTAINERS | 4 + drivers/mfd/Kconfig | 11 + drivers/mfd/Makefile | 1 + drivers/mfd/rohm-bd9576.c | 130 +++++++ drivers/regulator/Kconfig | 10 + drivers/regulator/Makefile | 1 + drivers/regulator/bd9576-regulator.c | 337 ++++++++++++++++++ drivers/watchdog/Kconfig | 13 + drivers/watchdog/Makefile | 1 + drivers/watchdog/bd9576_wdt.c | 295 +++++++++++++++ include/linux/mfd/rohm-bd957x.h | 61 ++++ include/linux/mfd/rohm-generic.h | 2 + 14 files changed, 1028 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd9576-pmic.yaml create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml create mode 100644 drivers/mfd/rohm-bd9576.c create mode 100644 drivers/regulator/bd9576-regulator.c create mode 100644 drivers/watchdog/bd9576_wdt.c create mode 100644 include/linux/mfd/rohm-bd957x.h base-commit: f4d51dffc6c01a9e94650d95ce0104964f8ae822 -- 2.21.0 -- Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =]
| | * regulator: Support ROHM BD9576MUF and BD9573MUFMatti Vaittinen2020-09-173-0/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add initial support for ROHM BD9576MUF and BD9573MUF PMICs regulators. These PMICs are mainly used to power the R-Car series processors. The BD9576 includes some functional-safety features which are not present on BD9573. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/78baea1d7922506827ca717e277e4e6b391bbb78.1600329307.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: ti-abb: Constify ti_abb_reg_opsRikard Falkeborn2020-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of ti_abb_reg_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200913084114.8851-6-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: pca9450: Constify static regulator_opsRikard Falkeborn2020-09-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usages of these is to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200913084114.8851-5-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: stw481x-vmmc: Constify static structsRikard Falkeborn2020-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of stw481x_vmmc_ops is to assign its address to the ops field in the regulator_desc struct which is a const pointer. The only usage of vmmc_regulator is to pass its address to of_get_regulator_init_data() and devm_regulator_register(), both which take const pointers. Make both of them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200913084114.8851-4-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: fixed: Constify static regulator_opsRikard Falkeborn2020-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of fixed_voltage_ops and fixed_voltage_clkenabled_ops is to assign their address the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200913084114.8851-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: dummy: Constify dummy_initdata and dummy_opsRikard Falkeborn2020-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of dummy_initdata is to assign its address to the init_data field of the regulator_config struct and the only usage dummy_ops is to assign its address to the ops field in the regulator_desc struct, both which are const pointers. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200913084114.8851-2-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: bd718x7: Make some variable staticYueHaibing2020-09-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sparse warnings: drivers/regulator/bd718x7-regulator.c:576:28: warning: symbol 'bd71847_swcontrol_ops' was not declared. Should it be static? drivers/regulator/bd718x7-regulator.c:585:28: warning: symbol 'bd71847_hwcontrol_ops' was not declared. Should it be static? drivers/regulator/bd718x7-regulator.c:902:28: warning: symbol 'bd71837_swcontrol_ops' was not declared. Should it be static? drivers/regulator/bd718x7-regulator.c:913:28: warning: symbol 'bd71837_hwcontrol_ops' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-By: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/20200910034240.37268-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | Merge series "regulator: unexport regulator_lock/unlock()" from Michał ↵Mark Brown2020-09-0718-82/+11
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mirosław <mirq-linux@rere.qmqm.pl>: This removes regulator_lock/unlock() calls around regulator_notifier_call_chain() as they are redundant - drivers already have to guarantee regulator_dev's existence during the call. This should make reasoing about the lock easier, as this was the only use outside regulator core code. The only client that needed recursive locking from the notifier chain was drivers/usb/host/ohci-da8xx.c, which responds to over-current notification by calling regulator_disable(). Michał Mirosław (3): regulator: don't require mutex for regulator_notifier_call_chain() regulator: remove locking around regulator_notifier_call_chain() regulator: unexport regulator_lock/unlock() drivers/regulator/core.c | 11 +++-------- drivers/regulator/da9055-regulator.c | 2 -- drivers/regulator/da9062-regulator.c | 2 -- drivers/regulator/da9063-regulator.c | 2 -- drivers/regulator/da9210-regulator.c | 4 ---- drivers/regulator/da9211-regulator.c | 4 ---- drivers/regulator/lp8755.c | 6 ------ drivers/regulator/ltc3589.c | 10 ++-------- drivers/regulator/ltc3676.c | 10 ++-------- drivers/regulator/pv88060-regulator.c | 10 ++-------- drivers/regulator/pv88080-regulator.c | 10 ++-------- drivers/regulator/pv88090-regulator.c | 10 ++-------- drivers/regulator/slg51000-regulator.c | 4 ---- drivers/regulator/stpmic1_regulator.c | 4 ---- drivers/regulator/wm831x-dcdc.c | 4 ---- drivers/regulator/wm831x-isink.c | 2 -- drivers/regulator/wm831x-ldo.c | 2 -- drivers/regulator/wm8350-regulator.c | 2 -- include/linux/regulator/driver.h | 3 --- 19 files changed, 13 insertions(+), 89 deletions(-) -- 2.20.1
| | * | regulator: remove locking around regulator_notifier_call_chain()Michał Mirosław2020-09-0717-78/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regulator_notifier_call_chain() doesn't need rdev lock and rdev's existence is assumed in the code anyway. Remove the locks from drivers. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/42393f66dcc4d80dcd9797be45216b4035aa96cb.1597032945.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | regulator: don't require mutex for regulator_notifier_call_chain()Michał Mirosław2020-09-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 3801b86aa482 ("regulator: Refactor supply implementation to work as regular consumers") we no longer cascade notifications and so notifier head's built-in rwsem is enough to protect the notifier chain. Remove the requirement to fix one case where rdev->mutex might be forced to be taken recursively. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/5a0da9017c69a4dbc3f9b50f44476fce80a73387.1597032945.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: lochnagar: Add additional VDDCORE rangeCharles Keepax2020-09-071-0/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case of an unrecognised mini-card the Lochnagar will not initialise the VDDCORE voltage register leading to a value outside of the current range. Add an additional range to cover these values, initially this wasn't done since they are duplicates of the existing minimum value. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200904122506.28017-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: bd718x7 fix regulator states at SUSPENDMatti Vaittinen2020-09-041-149/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BD718(37/47/50) regulator enable states can be controlled either by SW or by PMIC internal state machine. The bd718x7 driver has not supported leaving the regulators under HW state machine control (except for cases where this is required to avoid boot-up problems due to critical regulators being turned OFF at reset when SNVS used as reset state). On some systems this is undesirable as there now are setups where mixture of SW and HW state machine controlled regulators is needed. Specifically, some SoCs signal SUSPEND state change to PMIC via STBY_REQ line. Now there are setups that expect certain regulators then to be disabled (by PMIC state machine) while other regulators should stay enabled (regardless of HW state => SW control required). Add support for a new device-tree property "rohm,no-regulator-enable-control" which can be used to leave regulator(s) under HW state machine control. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/6ebba33dd08f2dcc9f1137bbff4d2dc905278a5a.1599029335.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: bd718x7 initialize regulator config only onceMatti Vaittinen2020-09-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BD718x7 driver initialized common configs for all regulators. Simplify initialization by moving the initialization of common configs out of the loop. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/2d3e68c94d4813410da8c4c7eac3332d167d19a8.1599029334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: tps65910: Constify static regulator_opsRikard Falkeborn2020-09-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of these is to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200829221104.20870-9-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: tps65912: Constify static regulator_opsRikard Falkeborn2020-09-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of tps65912_ops_dcdc and tps65912_ops_ldo is to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200829221104.20870-8-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: tps6586x: Constify static regulator_opsRikard Falkeborn2020-09-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of these are to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200829221104.20870-7-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: tps65090: constify static regulator_opsRikard Falkeborn2020-09-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usages of these are to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200829221104.20870-6-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: tps65086: Constify static regulator_opsRikard Falkeborn2020-09-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of reg_ops and switch_ops is to assign their addresses to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200829221104.20870-5-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: tps62360: Constify tps62360_dcdc_opsRikard Falkeborn2020-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of tps62360_dcdc_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200829221104.20870-4-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: tps6105x: Constify tps6105x_regulator_opsRikard Falkeborn2020-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of tps6105x_regulator_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200829221104.20870-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: tps51632: Constify tps51632_dcdc_opsRikard Falkeborn2020-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of tps51632_dcdc_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200829221104.20870-2-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: mt6360: fix spelling mistake: "regulaotr" -> "regulator"Piyush Goyal2020-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | There are some spelling mistakes in two dev_err messages. Fix these. Signed-off-by: Piyush Goyal <piyushgoyaliit@gmail.com> Link: https://lore.kernel.org/r/20200827133419.36151-1-piyushgoyaliit@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: mt6360: Add support for MT6360 regulatorGene Chen2020-08-263-0/+469
| | | | | | | | | | | | | | | | | | | | | | | | Add MT6360 regulator driver that contains two BUCKs and six LDOs Signed-off-by: Gene Chen <gene_chen@richtek.com> Link: https://lore.kernel.org/r/1598438958-26802-2-git-send-email-gene.chen.richtek@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: rt4801: Fix W=1 build warning when CONFIG_OF=nChiYuan Huang2020-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix below warning when CONFIG_OF=n: drivers/regulator/rt4801-regulator.c:206:34: warning: unused variable 'rt4801_of_id' [-Wunused-const-variable] 206 | static const struct of_device_id rt4801_of_id[] = { | ^~~~~~~~~~~~ Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/1598234713-8532-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: mp886x: use "mps,switch-frequency-hz"Jisheng Zhang2020-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As Rob suggested, use the "mps,switch-frequency-hz" instead of the "mps,switch-frequency" for switch frequency. Fortunately, the switch frequency support isn't released, so we can modify it now without any concern. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200824102402.4047fa5f@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
| * | Merge series "regulator: Fix W=1 build warning when CONFIG_OF=n" from ↵Mark Brown2020-08-2115-22/+22
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jisheng Zhang <Jisheng.Zhang@synaptics.com>: Fixing W=1 build warning when no support for device tree is there. Since v1: - fix the warning with __maybe_unused instead of CONFIG_OF macro - add 3 more patches to fix the same issue Jisheng Zhang (15): regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n regulator: da9210: Fix W=1 build warning when CONFIG_OF=n regulator: fan53555: Fix W=1 build warning when CONFIG_OF=n regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n regulator: ltc3589: Fix W=1 build warning when CONFIG_OF=n regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=n regulator: max1586: Fix W=1 build warning when CONFIG_OF=n regulator: max77826: Fix W=1 build warning when CONFIG_OF=n regulator: pwm: Fix W=1 build warning when CONFIG_OF=n regulator: stm32-pwr: Fix W=1 build warning when CONFIG_OF=n regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n regulator: sy8106a: Fix W=1 build warning when CONFIG_OF=n regulator: qcom-rpmh: Fix W=1 build warning when CONFIG_OF=n regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n regulator: tps65023: Fix W=1 build warning when CONFIG_OF=n drivers/regulator/88pg86x.c | 2 +- drivers/regulator/da9210-regulator.c | 2 +- drivers/regulator/fan53555.c | 2 +- drivers/regulator/fixed.c | 16 ++++++++-------- drivers/regulator/ltc3589.c | 2 +- drivers/regulator/ltc3676.c | 2 +- drivers/regulator/max1586.c | 2 +- drivers/regulator/max77826-regulator.c | 2 +- drivers/regulator/pwm-regulator.c | 2 +- drivers/regulator/qcom-rpmh-regulator.c | 2 +- drivers/regulator/stm32-booster.c | 2 +- drivers/regulator/stm32-pwr.c | 2 +- drivers/regulator/stm32-vrefbuf.c | 2 +- drivers/regulator/sy8106a-regulator.c | 2 +- drivers/regulator/tps65023-regulator.c | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) -- 2.28.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
| | * | regulator: tps65023: Fix W=1 build warning when CONFIG_OF=nJisheng Zhang2020-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix below warning when CONFIG_OF=n: drivers/regulator/tps65023-regulator.c:319:34: warning: ‘tps65023_of_match’ defined but not used [-Wunused-const-variable=] 319 | static const struct of_device_id tps65023_of_match[] = { | ^~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200821112009.58ee8511@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>