Skip to content

Commit 6717ff5

Browse files
QSchulzbroonie
authored andcommitted
regulator: rk808: fix LDO 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 3.4V is represented by the decimal value 232, the previous range max step value should be 231 and not 232. No expected change in behavior since 3.4V was mapped with step 232 from the first range but is now mapped with step 232 from the second range. While at it, remove the incorrect comment from the second range. 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-2-3904ab70d250@theobroma-systems.com Signed-off-by: Mark Brown <[email protected]>
1 parent 5803b54 commit 6717ff5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/regulator/rk808-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,8 @@ static const struct linear_range rk806_buck_voltage_ranges[] = {
10231023
};
10241024

10251025
static const struct linear_range rk806_ldo_voltage_ranges[] = {
1026-
REGULATOR_LINEAR_RANGE(500000, 0, 232, 12500), /* 500mV ~ 3400mV */
1027-
REGULATOR_LINEAR_RANGE(3400000, 233, 255, 0), /* 500mV ~ 3400mV */
1026+
REGULATOR_LINEAR_RANGE(500000, 0, 231, 12500), /* 500mV ~ 3400mV */
1027+
REGULATOR_LINEAR_RANGE(3400000, 232, 255, 0),
10281028
};
10291029

10301030
static const struct regulator_desc rk806_reg[] = {

0 commit comments

Comments
 (0)