diff options
author | David S. Miller <davem@davemloft.net> | 2016-06-30 05:03:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-30 05:03:36 -0400 |
commit | ee58b57100ca953da7320c285315a95db2f7053d (patch) | |
tree | 77b815a31240adc4d6326346908137fc6c2c3a96 /drivers/regulator/tps51632-regulator.c | |
parent | 6f30e8b022c8e3a722928ddb1a2ae0be852fcc0e (diff) | |
parent | e7bdea7750eb2a64aea4a08fa5c0a31719c8155d (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several cases of overlapping changes, except the packet scheduler
conflicts which deal with the addition of the free list parameter
to qdisc_enqueue().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/regulator/tps51632-regulator.c')
-rw-r--r-- | drivers/regulator/tps51632-regulator.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c index 572816e30095..c139890c1514 100644 --- a/drivers/regulator/tps51632-regulator.c +++ b/drivers/regulator/tps51632-regulator.c | |||
@@ -94,11 +94,14 @@ static int tps51632_dcdc_set_ramp_delay(struct regulator_dev *rdev, | |||
94 | int ramp_delay) | 94 | int ramp_delay) |
95 | { | 95 | { |
96 | struct tps51632_chip *tps = rdev_get_drvdata(rdev); | 96 | struct tps51632_chip *tps = rdev_get_drvdata(rdev); |
97 | int bit = ramp_delay/6000; | 97 | int bit; |
98 | int ret; | 98 | int ret; |
99 | 99 | ||
100 | if (bit) | 100 | if (ramp_delay == 0) |
101 | bit--; | 101 | bit = 0; |
102 | else | ||
103 | bit = DIV_ROUND_UP(ramp_delay, 6000) - 1; | ||
104 | |||
102 | ret = regmap_write(tps->regmap, TPS51632_SLEW_REGS, BIT(bit)); | 105 | ret = regmap_write(tps->regmap, TPS51632_SLEW_REGS, BIT(bit)); |
103 | if (ret < 0) | 106 | if (ret < 0) |
104 | dev_err(tps->dev, "SLEW reg write failed, err %d\n", ret); | 107 | dev_err(tps->dev, "SLEW reg write failed, err %d\n", ret); |