linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting
@ 2021-05-23  7:10 Axel Lin
  2021-05-23  7:10 ` [PATCH 2/2] regulator: bd71828: Fix .n_voltages settings Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Axel Lin @ 2021-05-23  7:10 UTC (permalink / raw)
  To: Mark Brown
  Cc: Matti Vaittinen, Lee Jones, Liam Girdwood, linux-kernel,
	linux-power, Axel Lin

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 <axel.lin@ingics.com>
---
I think this fix does not need "Fixes" tag because in original code the
.n_voltage is greater than correct one. The latest selector is not valid
in the linear range setting anyway.
 include/linux/mfd/rohm-bd70528.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/mfd/rohm-bd70528.h b/include/linux/mfd/rohm-bd70528.h
index a57af878fd0c..4a5966475a35 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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-06-01 14:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23  7:10 [PATCH 1/2] regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting Axel Lin
2021-05-23  7:10 ` [PATCH 2/2] regulator: bd71828: Fix .n_voltages settings Axel Lin
2021-05-24  6:17   ` Matti Vaittinen
2021-06-01 14:57   ` Lee Jones
2021-05-24  5:41 ` [PATCH 1/2] regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting Matti Vaittinen
2021-05-24  6:06   ` Axel Lin
2021-05-24  6:20     ` Vaittinen, Matti
2021-05-24 11:59 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).