Skip to content

Commit d1ef160

Browse files
Alina Yubroonie
authored andcommitted
regulator: rtq2208: Fix the BUCK ramp_delay range to maximum of 16mVstep/us
The maximum ramp up and down range of BUCK are shorten from 64mVstep/us to 16mVstep/us. Therefore, the RTQ2208_RAMP_VALUE_MAX_uV is modified to 16000uV in this version. Signed-off-by: Alina Yu <alina_yu@richtek.com> Link: https://lore.kernel.org/r/1777b18c0faa1f6b7196630e679a03362686c301.1714467553.git.alina_yu@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent ff33132 commit d1ef160

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/regulator/rtq2208-regulator.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
/* Value */
5050
#define RTQ2208_RAMP_VALUE_MIN_uV 500
51-
#define RTQ2208_RAMP_VALUE_MAX_uV 64000
51+
#define RTQ2208_RAMP_VALUE_MAX_uV 16000
5252

5353
#define RTQ2208_BUCK_MASK(uv_irq, ov_irq) (1 << ((uv_irq) % 8) | 1 << ((ov_irq) % 8))
5454

@@ -142,12 +142,11 @@ static int rtq2208_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
142142
* Because the relation of seleltion and value is like that
143143
*
144144
* seletion: value
145-
* 000: 64mv
146-
* 001: 32mv
145+
* 010: 16mv
147146
* ...
148147
* 111: 0.5mv
149148
*
150-
* For example, if I would like to select 64mv, the fls(ramp_delay) - 1 will be 0b111,
149+
* For example, if I would like to select 16mv, the fls(ramp_delay) - 1 will be 0b010,
151150
* and I need to use 0b111 - sel to do the shifting
152151
*/
153152

0 commit comments

Comments
 (0)