regulator: rtq2208: Fix the BUCK ramp_delay range to maximum of 16mVstep/us
authorAlina Yu <alina_yu@richtek.com>
Tue, 30 Apr 2024 09:58:27 +0000 (17:58 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 1 May 2024 14:11:37 +0000 (23:11 +0900)
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>
drivers/regulator/rtq2208-regulator.c

index 2d54844c4226bcb273847710808971a70b675281..3079de41ef3f6ebaf82ece371f0f30e90728b38a 100644 (file)
@@ -48,7 +48,7 @@
 
 /* Value */
 #define RTQ2208_RAMP_VALUE_MIN_uV              500
-#define RTQ2208_RAMP_VALUE_MAX_uV              64000
+#define RTQ2208_RAMP_VALUE_MAX_uV              16000
 
 #define RTQ2208_BUCK_MASK(uv_irq, ov_irq)      (1 << ((uv_irq) % 8) | 1 << ((ov_irq) % 8))
 
@@ -142,12 +142,11 @@ static int rtq2208_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
         * Because the relation of seleltion and value is like that
         *
         * seletion: value
-        * 000: 64mv
-        * 001: 32mv
+        * 010: 16mv
         * ...
         * 111: 0.5mv
         *
-        * For example, if I would like to select 64mv, the fls(ramp_delay) - 1 will be 0b111,
+        * For example, if I would like to select 16mv, the fls(ramp_delay) - 1 will be 0b010,
         * and I need to use 0b111 - sel to do the shifting
         */