From: Axel Lin Date: Sun, 23 May 2021 07:10:44 +0000 (+0800) Subject: regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting X-Git-Tag: accepted/tizen/unified/20230118.172025~7106^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0514582a1a5b4ac1a3fd64792826d392d7ae9ddc;p=platform%2Fkernel%2Flinux-rpi.git regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting The valid selectors for bd70528 bucks are 0 ~ 0xf, so the .n_voltages should be 16 (0x10). Use 0x10 to make it consistent with BD70528_LDO_VOLTS. Also remove redundant defines for BD70528_BUCK_VOLTS. Signed-off-by: Axel Lin Acked-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210523071045.2168904-1-axel.lin@ingics.com Signed-off-by: Mark Brown --- diff --git a/include/linux/mfd/rohm-bd70528.h b/include/linux/mfd/rohm-bd70528.h index a57af87..4a59664 100644 --- a/include/linux/mfd/rohm-bd70528.h +++ b/include/linux/mfd/rohm-bd70528.h @@ -26,9 +26,7 @@ struct bd70528_data { struct mutex rtc_timer_lock; }; -#define BD70528_BUCK_VOLTS 17 -#define BD70528_BUCK_VOLTS 17 -#define BD70528_BUCK_VOLTS 17 +#define BD70528_BUCK_VOLTS 0x10 #define BD70528_LDO_VOLTS 0x20 #define BD70528_REG_BUCK1_EN 0x0F