summaryrefslogtreecommitdiff
path: root/drivers/regulator/bd96801-regulator.c
AgeCommit message (Collapse)Author
2025-04-24regulator: bd96801: Support ROHM BD96806 PMICMatti Vaittinen
The ROHM BD96806 is from the software perspective almost identical to the ROHM BD96802. The main difference is different voltage tuning ranges. Add support differentiating these PMICs and provide correct voltages for both models. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/5d15660e0e71c70fda8df1694bec0e4fba7f251e.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2025-04-24regulator: bd96801: Support ROHM BD96805 PMICMatti Vaittinen
The ROHM BD96805 is from the software perspective almost identical to the ROHM BD96801. The main difference is different voltage tuning ranges. Add support differentiating these PMICs and provide correct voltages for both models. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/eab1369557b14a9762c41a5429d1ac87a4644d9e.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2025-04-24regulator: bd96801: Support ROHM BD96802Matti Vaittinen
The ROHM BD96802 PMIC is primarily intended to be used as a companion PMIC extending the capabilities of the BD96802 but it can be used on it's own as well. When used as a companion PMIC, the start-up and shut-down sequences are usually intitiated by the master PMIC using IF pins. The BD96802 looks from the digital interface point of view pretty much like a reduced version of BD96801. It includes only 2 BUCKs and provides the same error protection/detection mechanisms as the BD96801. Also, the voltage control logic is same up to the register addresses. Add support for controlling BD96802 using the BD96801 driver. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/2fb2d0d4997c32d18bfa32cea4564352c00eebc8.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2025-04-24regulator: bd96801: Drop IC name from the IRQ resourcesMatti Vaittinen
The resources generated in the BD96801 MFD driver are only visible to the sub-drivers whose resource fields they are added. This makes abbreviating the resource name with the IC name pointless. It just adds confusion in those sub-drivers which do not really care the exact model that generates the IRQ but just want to know the purpose IRQ was generated for. Thus, as a preparatory fix to simplify adding support for ROHM BD96802 PMIC the IC name "bd96801-" prefix was dropped from the IRQ resource names. Adapt the regulator driver to this change. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/73ec2425655ab19c9f0cf990419641ad36561590.1744090658.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-12-02regulator: bd96801: Add ERRB IRQMatti Vaittinen
The ROHM BD96801 "scalable PMIC" provides two physical IRQs. The ERRB handling can in many cases be omitted because it is used to inform fatal IRQs, which usually kill the power from the SOC. There may however be use-cases where the SOC has a 'back-up' emergency power source which allows some very short time of operation to try to gracefully shut down sensitive hardware. Furthermore, it is possible the processor controlling the PMIC is not powered by the PMIC. In such cases handling the ERRB IRQs may be beneficial. Add support for ERRB IRQs. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/ZzWkny4lKpY09SX5@mva-rohm Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-14regulator: bd96801: Use scoped device node handling to simplify error pathsKrzysztof Kozlowski
Obtain the device node reference with scoped/cleanup.h and use scoped for_each_child_of_node_scoped() to reduce error handling and make the code a bit simpler. Add also brackets {} over outer for loop for code readability. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240814-cleanup-h-of-node-put-regulator-v1-2-87151088b883@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-29regulator: bd96801: Delete unnecessary check in probe()Dan Carpenter
The "idesc" pointer points to the middle of rdesc[] array so it can't be NULL. Also rdesc isn't NULL. Delete the check. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/01cd578f-127b-4c8b-a8c6-5e11a0a2555c@stanley.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
2024-06-27regulator: bd96801: ROHM BD96801 PMIC regulatorsMatti Vaittinen
The ROHM BD96801 "Scalable PMIC" is an automotive grade PMIC which can scale to different applications by allowing chaining of PMICs. The PMIC also supports various protection features which can be configured either to fire IRQs - or to shut down power outputs when failure is detected. The driver implements basic voltage control and sending error notifications. NOTE: The driver does not support doing configuration which require the PMIC to be in STBY state. The omitted feature set includes setting safety limit values, changing LDO voltages and controlling enable state for some regulators. Also, the ERRB IRQ is not handled. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/50cf02b046df218a21a0f9c4820531d821fc20d4.1719473802.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>