* [PATCH RFT] regulator: fan53555: Fix off-by-one for TCS4525_NVOLTAGES
@ 2021-04-27 13:45 Axel Lin
2021-05-14 15:35 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2021-04-27 13:45 UTC (permalink / raw)
To: Mark Brown
Cc: Joseph Chen, Ezequiel Garcia, Liam Girdwood, linux-kernel, Axel Lin
While at it, also remove unused TCS_VSEL_NSEL_MASK.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Joseph & Ezequiel,
The TCS4525_NVOLTAGES is unlikely to be 127 because if it's 127 the
rdesc->vsel_mask will be 126 (i.e. 0b1111110, which only allows 64 different selectors).
I don't have the hw to verify (I just read the code and I might be wrong),
please check if this patch is correct or not.
Thanks,
Axel
drivers/regulator/fan53555.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index f3918f03aaf3..aa963435d2b2 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -55,9 +55,8 @@
#define FAN53555_NVOLTAGES 64 /* Numbers of voltages */
#define FAN53526_NVOLTAGES 128
-#define TCS4525_NVOLTAGES 127 /* Numbers of voltages */
+#define TCS4525_NVOLTAGES 128 /* Numbers of voltages */
-#define TCS_VSEL_NSEL_MASK 0x7f
#define TCS_VSEL0_MODE (1 << 7)
#define TCS_VSEL1_MODE (1 << 6)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RFT] regulator: fan53555: Fix off-by-one for TCS4525_NVOLTAGES
2021-04-27 13:45 [PATCH RFT] regulator: fan53555: Fix off-by-one for TCS4525_NVOLTAGES Axel Lin
@ 2021-05-14 15:35 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-05-14 15:35 UTC (permalink / raw)
To: Axel Lin; +Cc: Joseph Chen, Ezequiel Garcia, Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
On Tue, Apr 27, 2021 at 09:45:29PM +0800, Axel Lin wrote:
> While at it, also remove unused TCS_VSEL_NSEL_MASK.
This needs rebasing against current code, I'm not sure if the issue
still applies though.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-14 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 13:45 [PATCH RFT] regulator: fan53555: Fix off-by-one for TCS4525_NVOLTAGES Axel Lin
2021-05-14 15:35 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.