Re: [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay
2014-05-07 17:48 GMT+08:00 Krzysztof Kozlowski : > I forgot to CC the stable. > > Mark, if the patches are OK and if you'll apply them, could you add a CC > stable to the commit msg? Hi Krzysztof, Unless this serial misses 3.15, I think this serial does not need to CC stable. Both b96244fad953 ("regulator: s2mps11: Don't check enable_shift before setting enable ramp rate") f7b1a8dc1c1c ("regulator: s2mpa01: Don't check enable_shift before setting enable ramp rate") are exist in 3.15 only. $ git describe --contains b96244fad953 regulator-v3.15-fixes^3 $ git describe --contains f7b1a8dc1c1c regulator-v3.15-fixes^3~1 Regards, Axel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay
2014-05-07 17:48 GMT+08:00 Krzysztof Kozlowski k.kozlow...@samsung.com: I forgot to CC the stable. Mark, if the patches are OK and if you'll apply them, could you add a CC stable to the commit msg? Hi Krzysztof, Unless this serial misses 3.15, I think this serial does not need to CC stable. Both b96244fad953 (regulator: s2mps11: Don't check enable_shift before setting enable ramp rate) f7b1a8dc1c1c (regulator: s2mpa01: Don't check enable_shift before setting enable ramp rate) are exist in 3.15 only. $ git describe --contains b96244fad953 regulator-v3.15-fixes^3 $ git describe --contains f7b1a8dc1c1c regulator-v3.15-fixes^3~1 Regards, Axel -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay
I forgot to CC the stable. Mark, if the patches are OK and if you'll apply them, could you add a CC stable to the commit msg? Best regards, Krzysztof On wto, 2014-05-06 at 08:37 +0200, Krzysztof Kozlowski wrote: > 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. > > Signed-off-by: Krzysztof Kozlowski > Fixes: b96244fad953 ("regulator: s2mps11: Don't check enable_shift before > setting enable ramp rate") > --- > > Changes since v2: > * Apply Axel Lin's suggestion (don't change the meaning >of enable_shift variable). > > --- > drivers/regulator/s2mps11.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c > index e713c162fbd4..aaca37e1424f 100644 > --- a/drivers/regulator/s2mps11.c > +++ b/drivers/regulator/s2mps11.c > @@ -202,11 +202,16 @@ static int s2mps11_set_ramp_delay(struct regulator_dev > *rdev, int ramp_delay) > 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(>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(>dev, "failed to enable ramp rate\n"); > + return ret; > + } > } > > ramp_val = get_ramp_delay(ramp_delay); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay
I forgot to CC the stable. Mark, if the patches are OK and if you'll apply them, could you add a CC stable to the commit msg? Best regards, Krzysztof On wto, 2014-05-06 at 08:37 +0200, Krzysztof Kozlowski wrote: 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. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Fixes: b96244fad953 (regulator: s2mps11: Don't check enable_shift before setting enable ramp rate) --- Changes since v2: * Apply Axel Lin's suggestion (don't change the meaning of enable_shift variable). --- drivers/regulator/s2mps11.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index e713c162fbd4..aaca37e1424f 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -202,11 +202,16 @@ static int s2mps11_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay) 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); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay
2014-05-06 14:37 GMT+08:00 Krzysztof Kozlowski : > 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. > > Signed-off-by: Krzysztof Kozlowski > Fixes: b96244fad953 ("regulator: s2mps11: Don't check enable_shift before > setting enable ramp rate") For this serial, Reviewed-by: Axel Lin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay
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. Signed-off-by: Krzysztof Kozlowski Fixes: b96244fad953 ("regulator: s2mps11: Don't check enable_shift before setting enable ramp rate") --- Changes since v2: * Apply Axel Lin's suggestion (don't change the meaning of enable_shift variable). --- drivers/regulator/s2mps11.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index e713c162fbd4..aaca37e1424f 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -202,11 +202,16 @@ static int s2mps11_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay) 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(>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(>dev, "failed to enable ramp rate\n"); + return ret; + } } ramp_val = get_ramp_delay(ramp_delay); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay
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. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Fixes: b96244fad953 (regulator: s2mps11: Don't check enable_shift before setting enable ramp rate) --- Changes since v2: * Apply Axel Lin's suggestion (don't change the meaning of enable_shift variable). --- drivers/regulator/s2mps11.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index e713c162fbd4..aaca37e1424f 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -202,11 +202,16 @@ static int s2mps11_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay) 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); -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay
2014-05-06 14:37 GMT+08:00 Krzysztof Kozlowski k.kozlow...@samsung.com: 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. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Fixes: b96244fad953 (regulator: s2mps11: Don't check enable_shift before setting enable ramp rate) For this serial, Reviewed-by: Axel Lin axel@ingics.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/