diff options
author | Mark Brown <broonie@kernel.org> | 2021-06-23 17:56:31 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-23 17:56:31 +0200 |
commit | 7fb593cbd88cf4df01c096d4dc320f027dfa2560 (patch) | |
tree | 1970f6b62728d95ab52de9813bfcf66cd59a48b5 /drivers/regulator/qcom-labibb-regulator.c | |
parent | Merge remote-tracking branch 'regulator/for-5.13' into regulator-linus (diff) | |
parent | regulator: bd9576: Fix uninitializes variable may_have_irqs (diff) | |
download | linux-7fb593cbd88cf4df01c096d4dc320f027dfa2560.tar.xz linux-7fb593cbd88cf4df01c096d4dc320f027dfa2560.zip |
Merge remote-tracking branch 'regulator/for-5.14' into regulator-next
Diffstat (limited to 'drivers/regulator/qcom-labibb-regulator.c')
-rw-r--r-- | drivers/regulator/qcom-labibb-regulator.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/regulator/qcom-labibb-regulator.c b/drivers/regulator/qcom-labibb-regulator.c index de25e3279b4b..b3da0dc58782 100644 --- a/drivers/regulator/qcom-labibb-regulator.c +++ b/drivers/regulator/qcom-labibb-regulator.c @@ -307,13 +307,21 @@ end: return IRQ_HANDLED; } -static int qcom_labibb_set_ocp(struct regulator_dev *rdev) +static int qcom_labibb_set_ocp(struct regulator_dev *rdev, int lim, + int severity, bool enable) { struct labibb_regulator *vreg = rdev_get_drvdata(rdev); char *ocp_irq_name; u32 irq_flags = IRQF_ONESHOT; int irq_trig_low, ret; + /* + * labibb supports only protection - and does not support setting + * limit. Furthermore, we don't support disabling protection. + */ + if (lim || severity != REGULATOR_SEVERITY_PROT || !enable) + return -EINVAL; + /* If there is no OCP interrupt, there's nothing to set */ if (vreg->ocp_irq <= 0) return -EINVAL; |