Patch "regulator: s2mps11: Fix accidental enable of buck6 ramp delay" has been added to the 3.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    regulator: s2mps11: Fix accidental enable of buck6 ramp delay

to the 3.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     regulator-s2mps11-fix-accidental-enable-of-buck6-ramp-delay.patch
and it can be found in the queue-3.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From b203e0dfe1a2b0ae5e2681e9285056e4ae8560af Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
Date: Tue, 6 May 2014 08:37:36 +0200
Subject: regulator: s2mps11: Fix accidental enable of buck6 ramp delay

From: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>

commit b203e0dfe1a2b0ae5e2681e9285056e4ae8560af upstream.

S2MPS11 supports enabling/disabling ramp delay only for buck[2346].
Other bucks have ramp delay enabled always.

However the bit shift for enabling buck6 ramp delay in register is equal
to 0. When ramp delay was set for the bucks unsupporting enable/disable
(buck[15789] and buck10), the ramp delay for buck6 was also enabled.

Fixes: b96244fad953 ("regulator: s2mps11: Don't check enable_shift before setting enable ramp rate")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
Reviewed-by: Axel Lin <axel.lin@xxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/regulator/s2mps11.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -202,11 +202,16 @@ static int s2mps11_set_ramp_delay(struct
 	if (!ramp_enable)
 		goto ramp_disable;
 
-	ret = regmap_update_bits(rdev->regmap, S2MPS11_REG_RAMP,
-				 1 << enable_shift, 1 << enable_shift);
-	if (ret) {
-		dev_err(&rdev->dev, "failed to enable ramp rate\n");
-		return ret;
+	/* Ramp delay can be enabled/disabled only for buck[2346] */
+	if ((rdev_get_id(rdev) >= S2MPS11_BUCK2 &&
+			rdev_get_id(rdev) <= S2MPS11_BUCK4) ||
+			rdev_get_id(rdev) == S2MPS11_BUCK6)  {
+		ret = regmap_update_bits(rdev->regmap, S2MPS11_REG_RAMP,
+					 1 << enable_shift, 1 << enable_shift);
+		if (ret) {
+			dev_err(&rdev->dev, "failed to enable ramp rate\n");
+			return ret;
+		}
 	}
 
 	ramp_val = get_ramp_delay(ramp_delay);


Patches currently in stable-queue which might be from k.kozlowski@xxxxxxxxxxx are

queue-3.15/extcon-max14577-properly-handle-regmap_irq_get_virq-error.patch
queue-3.15/extcon-max14577-fix-probe-failure-on-successful-work-queue.patch
queue-3.15/regulator-s2mpa01-use-correct-register-for-buck1-ramp-delay.patch
queue-3.15/extcon-max77693-fix-two-null-pointer-exceptions-on-missing-pdata.patch
queue-3.15/regulator-s2mps11-fix-accidental-enable-of-buck6-ramp-delay.patch
queue-3.15/extcon-max8997-fix-null-pointer-exception-on-missing-pdata.patch
queue-3.15/regulator-s2mpa01-fix-accidental-enable-of-buck4-ramp-delay.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]