aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-11-28 09:40:53 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2024-11-28 09:40:53 -0800
commitd83ec4afd209a0619b32b867f45c845d4dddc2eb (patch)
treec2d1e32f397617b2fb31b3817fc19f80f611c546 /drivers/regulator/core.c
parent448ecd5771e255629bef0fb16c9b78c4bbd7bd56 (diff)
parent351f2bfe6362c663f45f5c6111f14365cfd094ab (diff)
downloadlinux-d83ec4afd209a0619b32b867f45c845d4dddc2eb.tar.gz
linux-d83ec4afd209a0619b32b867f45c845d4dddc2eb.tar.bz2
linux-d83ec4afd209a0619b32b867f45c845d4dddc2eb.zip
Merge tag 'regulator-fix-v6.13-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown: "A couple of fixes that came in during the merge window, plus documetation of a new device ID for the Qualcomm LABIBB driver. There's a core fix for the rarely used current constraints and a fix for the Qualcomm RPMH driver which had described only one of the two voltage ranges that the hardware could control, creating a potential incompatibility with the configuration left by firmware" * tag 'regulator-fix-v6.13-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: Ignore unset max_uA constraints in current limit check dt-bindings: regulator: qcom-labibb-regulator: document the pmi8950 labibb regulator regulator: qcom-rpmh: Update ranges for FTSMPS525
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 84d48e310aa8..8cb948a91e60 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -497,7 +497,8 @@ static int regulator_check_current_limit(struct regulator_dev *rdev,
return -EPERM;
}
- if (*max_uA > rdev->constraints->max_uA)
+ if (*max_uA > rdev->constraints->max_uA &&
+ rdev->constraints->max_uA)
*max_uA = rdev->constraints->max_uA;
if (*min_uA < rdev->constraints->min_uA)
*min_uA = rdev->constraints->min_uA;