Skip to content

Commit 5803b54

Browse files
QSchulzbroonie
authored andcommitted
regulator: rk808: fix buck range on RK806
The linear ranges aren't really matching what they should be. Indeed, the range is inclusive of the min value, so it makes sense the previous range does NOT include the max step value representing the min value of the range in question. Since 1.5V is represented by the decimal value 160, the previous range max step value should be 159 and not 160. Similarly, 3.4V is represented by the decimal value 236, so the previous range max value should be 235 and not 237. The only change in behavior this makes is that this actually modeled the ranges to map step with decimal value 237 with 3.65V instead of 3.4V (the max supported by the HW). Fixes: f991a22 ("regulator: rk808: add rk806 support") Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Link: https://msgid.link/r/20240223-rk806-regulator-ranges-v1-1-3904ab70d250@theobroma-systems.com Signed-off-by: Mark Brown <[email protected]>
1 parent e5d40e9 commit 5803b54

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/regulator/rk808-regulator.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,9 +1017,9 @@ static const struct regulator_desc rk805_reg[] = {
10171017
};
10181018

10191019
static const struct linear_range rk806_buck_voltage_ranges[] = {
1020-
REGULATOR_LINEAR_RANGE(500000, 0, 160, 6250), /* 500mV ~ 1500mV */
1021-
REGULATOR_LINEAR_RANGE(1500000, 161, 237, 25000), /* 1500mV ~ 3400mV */
1022-
REGULATOR_LINEAR_RANGE(3400000, 238, 255, 0),
1020+
REGULATOR_LINEAR_RANGE(500000, 0, 159, 6250), /* 500mV ~ 1500mV */
1021+
REGULATOR_LINEAR_RANGE(1500000, 160, 235, 25000), /* 1500mV ~ 3400mV */
1022+
REGULATOR_LINEAR_RANGE(3400000, 236, 255, 0),
10231023
};
10241024

10251025
static const struct linear_range rk806_ldo_voltage_ranges[] = {

0 commit comments

Comments
 (0)