From: Matti Vaittinen Date: Tue, 7 Apr 2026 13:27:19 +0000 (+0300) Subject: regulator: bd71828-regulator.c: Fix LDON-HEAD mode X-Git-Tag: v7.0~10^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1baaff4e5231f0d7db209f72a43112cd2d29257;p=thirdparty%2Flinux.git regulator: bd71828-regulator.c: Fix LDON-HEAD mode The ROHM BD72720 supports so called LDON-HEAD -mode, in which the buck10 is expected to be supplying power for an LDO. In this mode, the buck10 voltage will follow what is set for the LDO, on order to lower the power-loss in the LDO. This hardware configuration can be adverticed via the device-tree. When this is done, the Linux driver should omit registering the voltage control operations for the buck10, because the voltage control is now done by the hardware. This is done by modifying the buck10 regulator descriptor, before passing it to the regulator registration functions. There is an off-by-one error when the regulator descriptor array is indexed, and wrong descriptor is modified causing the LDO1 operations to be modified instead of the BUCK10 operations. Fix this by correcting the indexing. Signed-off-by: Matti Vaittinen Fixes: f16a9d76a71d ("regulator: bd71828: Support ROHM BD72720") Link: https://patch.msgid.link/e7eef0bd407522ae5d9b7d0c4ec43f40b1dba833.1775565148.git.mazziesaccount@gmail.com Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/bd71828-regulator.c b/drivers/regulator/bd71828-regulator.c index c8f3343cfe23..473beb4399d9 100644 --- a/drivers/regulator/bd71828-regulator.c +++ b/drivers/regulator/bd71828-regulator.c @@ -785,7 +785,7 @@ static const struct bd71828_regulator_data bd71828_rdata[] = { }, }; -#define BD72720_BUCK10_DESC_INDEX 10 +#define BD72720_BUCK10_DESC_INDEX 9 #define BD72720_NUM_BUCK_VOLTS 0x100 #define BD72720_NUM_LDO_VOLTS 0x100 #define BD72720_NUM_LDO12346_VOLTS 0x80