[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1399456358-12168-1-git-send-email-k.kozlowski@samsung.com>
Date: Wed, 07 May 2014 11:52:38 +0200
From: Krzysztof Kozlowski <k.kozlowski@...sung.com>
To: Sangbeom Kim <sbkim73@...sung.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Sachin Kamat <sachin.kamat@...aro.org>,
linux-kernel@...r.kernel.org
Cc: Krzysztof Kozlowski <k.kozlowski@...sung.com>,
stable@...r.kernel.org
Subject: [RFT PATCH] regulator: s2mpa01: Use correct register for buck[36] ramp
delay
Buck1 and buck6 share the field (offset 4) in ramp delay register
(S2MPA01_REG_RAMP1). The buck3 uses its own field in S2MPA01_REG_RAMP2
register, also at offset 4.
The driver interchanged the registers for ramp delay of buck3 and buck6.
This lead to updating ramp delay for wrong buck (buck3 instead of buck6
and vice versa).
Cc: <stable@...r.kernel.org>
Fixes: f18792714608 ("regulator: Add support for S2MPA01 regulator")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
---
drivers/regulator/s2mpa01.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c
index f19a30f0fb42..67a5ab335dae 100644
--- a/drivers/regulator/s2mpa01.c
+++ b/drivers/regulator/s2mpa01.c
@@ -137,17 +137,16 @@ static int s2mpa01_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
enable_shift = S2MPA01_BUCK3_RAMP_EN_SHIFT;
if (!ramp_delay) {
ramp_enable = 0;
break;
}
s2mpa01->ramp_delay3 = ramp_delay;
ramp_shift = S2MPA01_BUCK3_RAMP_SHIFT;
- ramp_reg = S2MPA01_REG_RAMP1;
break;
case S2MPA01_BUCK4:
enable_shift = S2MPA01_BUCK4_RAMP_EN_SHIFT;
if (!ramp_delay) {
ramp_enable = 0;
break;
}
@@ -165,16 +164,17 @@ static int s2mpa01_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
break;
case S2MPA01_BUCK6:
if (ramp_delay > s2mpa01->ramp_delay16)
s2mpa01->ramp_delay16 = ramp_delay;
else
ramp_delay = s2mpa01->ramp_delay16;
ramp_shift = S2MPA01_BUCK16_RAMP_SHIFT;
+ ramp_reg = S2MPA01_REG_RAMP1;
break;
case S2MPA01_BUCK7:
s2mpa01->ramp_delay7 = ramp_delay;
ramp_shift = S2MPA01_BUCK7_RAMP_SHIFT;
break;
case S2MPA01_BUCK8:
case S2MPA01_BUCK9:
case S2MPA01_BUCK10:
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists