* [PATCH] pwm: adp5585: correct mismatched pwm chip info
@ 2025-11-14 6:53 ziniu.wang_1
2025-11-14 7:58 ` Liu Ying
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: ziniu.wang_1 @ 2025-11-14 6:53 UTC (permalink / raw)
To: laurent.pinchart, ukleinek, nuno.sa, lee
Cc: linux-gpio, linux-pwm, linux-kernel, imx
From: Luke Wang <ziniu.wang_1@nxp.com>
The register addresses of ADP5585 and ADP5589 are reversed.
Fixes: 75024f97e82e ("pwm: adp5585: add support for adp5589")
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
---
drivers/pwm/pwm-adp5585.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-adp5585.c b/drivers/pwm/pwm-adp5585.c
index dc2860979e24..806f8d79b0d7 100644
--- a/drivers/pwm/pwm-adp5585.c
+++ b/drivers/pwm/pwm-adp5585.c
@@ -190,13 +190,13 @@ static int adp5585_pwm_probe(struct platform_device *pdev)
return 0;
}
-static const struct adp5585_pwm_chip adp5589_pwm_chip_info = {
+static const struct adp5585_pwm_chip adp5585_pwm_chip_info = {
.pwm_cfg = ADP5585_PWM_CFG,
.pwm_offt_low = ADP5585_PWM_OFFT_LOW,
.pwm_ont_low = ADP5585_PWM_ONT_LOW,
};
-static const struct adp5585_pwm_chip adp5585_pwm_chip_info = {
+static const struct adp5585_pwm_chip adp5589_pwm_chip_info = {
.pwm_cfg = ADP5589_PWM_CFG,
.pwm_offt_low = ADP5589_PWM_OFFT_LOW,
.pwm_ont_low = ADP5589_PWM_ONT_LOW,
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] pwm: adp5585: correct mismatched pwm chip info 2025-11-14 6:53 [PATCH] pwm: adp5585: correct mismatched pwm chip info ziniu.wang_1 @ 2025-11-14 7:58 ` Liu Ying 2025-11-14 8:50 ` Nuno Sá 2025-11-14 9:30 ` Uwe Kleine-König 2 siblings, 0 replies; 7+ messages in thread From: Liu Ying @ 2025-11-14 7:58 UTC (permalink / raw) To: ziniu.wang_1, laurent.pinchart, ukleinek, nuno.sa, lee Cc: linux-gpio, linux-pwm, linux-kernel, imx Hi Luke, Thanks for your patch. On 11/14/2025, ziniu.wang_1@nxp.com wrote: > From: Luke Wang <ziniu.wang_1@nxp.com> > > The register addresses of ADP5585 and ADP5589 are reversed. > > Fixes: 75024f97e82e ("pwm: adp5585: add support for adp5589") > > Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> > --- > drivers/pwm/pwm-adp5585.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Tested-by: Liu Ying <victor.liu@nxp.com> # ADP5585 PWM -- Regards, Liu Ying ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pwm: adp5585: correct mismatched pwm chip info 2025-11-14 6:53 [PATCH] pwm: adp5585: correct mismatched pwm chip info ziniu.wang_1 2025-11-14 7:58 ` Liu Ying @ 2025-11-14 8:50 ` Nuno Sá 2025-11-14 9:30 ` Uwe Kleine-König 2 siblings, 0 replies; 7+ messages in thread From: Nuno Sá @ 2025-11-14 8:50 UTC (permalink / raw) To: ziniu.wang_1, laurent.pinchart, ukleinek, nuno.sa, lee Cc: linux-gpio, linux-pwm, linux-kernel, imx On Fri, 2025-11-14 at 14:53 +0800, ziniu.wang_1@nxp.com wrote: > From: Luke Wang <ziniu.wang_1@nxp.com> > > The register addresses of ADP5585 and ADP5589 are reversed. > > Fixes: 75024f97e82e ("pwm: adp5585: add support for adp5589") > > Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> > --- Ouch! Thanks for the fix! Acked-by: Nuno Sá <nuno.sa@analog.com> > > drivers/pwm/pwm-adp5585.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pwm/pwm-adp5585.c b/drivers/pwm/pwm-adp5585.c > index dc2860979e24..806f8d79b0d7 100644 > --- a/drivers/pwm/pwm-adp5585.c > +++ b/drivers/pwm/pwm-adp5585.c > @@ -190,13 +190,13 @@ static int adp5585_pwm_probe(struct platform_device *pdev) > return 0; > } > > -static const struct adp5585_pwm_chip adp5589_pwm_chip_info = { > +static const struct adp5585_pwm_chip adp5585_pwm_chip_info = { > .pwm_cfg = ADP5585_PWM_CFG, > .pwm_offt_low = ADP5585_PWM_OFFT_LOW, > .pwm_ont_low = ADP5585_PWM_ONT_LOW, > }; > > -static const struct adp5585_pwm_chip adp5585_pwm_chip_info = { > +static const struct adp5585_pwm_chip adp5589_pwm_chip_info = { > .pwm_cfg = ADP5589_PWM_CFG, > .pwm_offt_low = ADP5589_PWM_OFFT_LOW, > .pwm_ont_low = ADP5589_PWM_ONT_LOW, ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pwm: adp5585: correct mismatched pwm chip info 2025-11-14 6:53 [PATCH] pwm: adp5585: correct mismatched pwm chip info ziniu.wang_1 2025-11-14 7:58 ` Liu Ying 2025-11-14 8:50 ` Nuno Sá @ 2025-11-14 9:30 ` Uwe Kleine-König 2025-11-14 9:46 ` Nuno Sá 2 siblings, 1 reply; 7+ messages in thread From: Uwe Kleine-König @ 2025-11-14 9:30 UTC (permalink / raw) To: ziniu.wang_1 Cc: laurent.pinchart, nuno.sa, lee, linux-gpio, linux-pwm, linux-kernel, imx [-- Attachment #1: Type: text/plain, Size: 1624 bytes --] Hello, On Fri, Nov 14, 2025 at 02:53:08PM +0800, ziniu.wang_1@nxp.com wrote: > From: Luke Wang <ziniu.wang_1@nxp.com> > > The register addresses of ADP5585 and ADP5589 are reversed. My German feeling for the English language suggests: s/reversed/swapped/. > Fixes: 75024f97e82e ("pwm: adp5585: add support for adp5589") > > Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> > --- > drivers/pwm/pwm-adp5585.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pwm/pwm-adp5585.c b/drivers/pwm/pwm-adp5585.c > index dc2860979e24..806f8d79b0d7 100644 > --- a/drivers/pwm/pwm-adp5585.c > +++ b/drivers/pwm/pwm-adp5585.c > @@ -190,13 +190,13 @@ static int adp5585_pwm_probe(struct platform_device *pdev) > return 0; > } > > -static const struct adp5585_pwm_chip adp5589_pwm_chip_info = { > +static const struct adp5585_pwm_chip adp5585_pwm_chip_info = { > .pwm_cfg = ADP5585_PWM_CFG, > .pwm_offt_low = ADP5585_PWM_OFFT_LOW, > .pwm_ont_low = ADP5585_PWM_ONT_LOW, > }; > > -static const struct adp5585_pwm_chip adp5585_pwm_chip_info = { > +static const struct adp5585_pwm_chip adp5589_pwm_chip_info = { > .pwm_cfg = ADP5589_PWM_CFG, > .pwm_offt_low = ADP5589_PWM_OFFT_LOW, > .pwm_ont_low = ADP5589_PWM_ONT_LOW, I wonder how that didn't pop up during development of 75024f97e82e. I would expect that the driver doesn't work correctly in a very obvious way without this change?! I tend to want to send this to Linus before 6.18, but the question makes me wonder if I'm correct with that urgency. Any insights? Best regards Uwe [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pwm: adp5585: correct mismatched pwm chip info 2025-11-14 9:30 ` Uwe Kleine-König @ 2025-11-14 9:46 ` Nuno Sá 2025-11-14 11:03 ` Uwe Kleine-König 2025-11-18 5:17 ` Liu Ying 0 siblings, 2 replies; 7+ messages in thread From: Nuno Sá @ 2025-11-14 9:46 UTC (permalink / raw) To: Uwe Kleine-König, ziniu.wang_1 Cc: laurent.pinchart, nuno.sa, lee, linux-gpio, linux-pwm, linux-kernel, imx On Fri, 2025-11-14 at 10:30 +0100, Uwe Kleine-König wrote: > Hello, > > On Fri, Nov 14, 2025 at 02:53:08PM +0800, ziniu.wang_1@nxp.com wrote: > > From: Luke Wang <ziniu.wang_1@nxp.com> > > > > The register addresses of ADP5585 and ADP5589 are reversed. > > My German feeling for the English language suggests: > s/reversed/swapped/. > > > Fixes: 75024f97e82e ("pwm: adp5585: add support for adp5589") > > > > Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> > > --- > > drivers/pwm/pwm-adp5585.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/pwm/pwm-adp5585.c b/drivers/pwm/pwm-adp5585.c > > index dc2860979e24..806f8d79b0d7 100644 > > --- a/drivers/pwm/pwm-adp5585.c > > +++ b/drivers/pwm/pwm-adp5585.c > > @@ -190,13 +190,13 @@ static int adp5585_pwm_probe(struct platform_device *pdev) > > return 0; > > } > > > > -static const struct adp5585_pwm_chip adp5589_pwm_chip_info = { > > +static const struct adp5585_pwm_chip adp5585_pwm_chip_info = { > > .pwm_cfg = ADP5585_PWM_CFG, > > .pwm_offt_low = ADP5585_PWM_OFFT_LOW, > > .pwm_ont_low = ADP5585_PWM_ONT_LOW, > > }; > > > > -static const struct adp5585_pwm_chip adp5585_pwm_chip_info = { > > +static const struct adp5585_pwm_chip adp5589_pwm_chip_info = { > > .pwm_cfg = ADP5589_PWM_CFG, > > .pwm_offt_low = ADP5589_PWM_OFFT_LOW, > > .pwm_ont_low = ADP5589_PWM_ONT_LOW, > > I wonder how that didn't pop up during development of 75024f97e82e. I > would expect that the driver doesn't work correctly in a very obvious > way without this change?! I tend to want to send this to Linus before > 6.18, but the question makes me wonder if I'm correct with that > urgency. Any insights? Yeah, this one I kind of asked for Liu to test it (as I was not testing the PWM bits) and he did tested it [2]. But it was v2 and that series had some more iterations. So I suspect that I messed up along the way and the last version of the series was not tested (for the PWM bits). [2]: https://lore.kernel.org/linux-gpio/3efb68e2-7091-47e1-81a2-39930da5a427@nxp.com/ - Nuno Sá > > Best regards > Uwe ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pwm: adp5585: correct mismatched pwm chip info 2025-11-14 9:46 ` Nuno Sá @ 2025-11-14 11:03 ` Uwe Kleine-König 2025-11-18 5:17 ` Liu Ying 1 sibling, 0 replies; 7+ messages in thread From: Uwe Kleine-König @ 2025-11-14 11:03 UTC (permalink / raw) To: Nuno Sá Cc: ziniu.wang_1, laurent.pinchart, nuno.sa, lee, linux-gpio, linux-pwm, linux-kernel, imx [-- Attachment #1: Type: text/plain, Size: 1520 bytes --] Hello Nuno, On Fri, Nov 14, 2025 at 09:46:43AM +0000, Nuno Sá wrote: > On Fri, 2025-11-14 at 10:30 +0100, Uwe Kleine-König wrote: > > On Fri, Nov 14, 2025 at 02:53:08PM +0800, ziniu.wang_1@nxp.com wrote: > > > From: Luke Wang <ziniu.wang_1@nxp.com> > > > > > > The register addresses of ADP5585 and ADP5589 are reversed. > > > > My German feeling for the English language suggests: > > s/reversed/swapped/. I applied this substitution and dropped the empty line between Fixes: and the first Signed-off-by: line. > > I wonder how that didn't pop up during development of 75024f97e82e. I > > would expect that the driver doesn't work correctly in a very obvious > > way without this change?! I tend to want to send this to Linus before > > 6.18, but the question makes me wonder if I'm correct with that > > urgency. Any insights? > > Yeah, this one I kind of asked for Liu to test it (as I was not testing the PWM bits) > and he did tested it [2]. But it was v2 and that series had some more iterations. So > I suspect that I messed up along the way and the last version of the series was not > tested (for the PWM bits). > > [2]: https://lore.kernel.org/linux-gpio/3efb68e2-7091-47e1-81a2-39930da5a427@nxp.com/ OK, so I guess it is sensible to get it into 6.18. I applied it for next (i.e. https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next ) and will send it to Linus mid next week in the assumption that no issues pop up. Best regards Uwe [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pwm: adp5585: correct mismatched pwm chip info 2025-11-14 9:46 ` Nuno Sá 2025-11-14 11:03 ` Uwe Kleine-König @ 2025-11-18 5:17 ` Liu Ying 1 sibling, 0 replies; 7+ messages in thread From: Liu Ying @ 2025-11-18 5:17 UTC (permalink / raw) To: Nuno Sá, Uwe Kleine-König, ziniu.wang_1 Cc: laurent.pinchart, nuno.sa, lee, linux-gpio, linux-pwm, linux-kernel, imx On 11/14/2025, Nuno Sá wrote: > On Fri, 2025-11-14 at 10:30 +0100, Uwe Kleine-König wrote: >> Hello, >> >> On Fri, Nov 14, 2025 at 02:53:08PM +0800, ziniu.wang_1@nxp.com wrote: >>> From: Luke Wang <ziniu.wang_1@nxp.com> >>> >>> The register addresses of ADP5585 and ADP5589 are reversed. >> >> My German feeling for the English language suggests: >> s/reversed/swapped/. >> >>> Fixes: 75024f97e82e ("pwm: adp5585: add support for adp5589") >>> >>> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> >>> --- >>> drivers/pwm/pwm-adp5585.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/pwm/pwm-adp5585.c b/drivers/pwm/pwm-adp5585.c >>> index dc2860979e24..806f8d79b0d7 100644 >>> --- a/drivers/pwm/pwm-adp5585.c >>> +++ b/drivers/pwm/pwm-adp5585.c >>> @@ -190,13 +190,13 @@ static int adp5585_pwm_probe(struct platform_device *pdev) >>> return 0; >>> } >>> >>> -static const struct adp5585_pwm_chip adp5589_pwm_chip_info = { >>> +static const struct adp5585_pwm_chip adp5585_pwm_chip_info = { >>> .pwm_cfg = ADP5585_PWM_CFG, >>> .pwm_offt_low = ADP5585_PWM_OFFT_LOW, >>> .pwm_ont_low = ADP5585_PWM_ONT_LOW, >>> }; >>> >>> -static const struct adp5585_pwm_chip adp5585_pwm_chip_info = { >>> +static const struct adp5585_pwm_chip adp5589_pwm_chip_info = { >>> .pwm_cfg = ADP5589_PWM_CFG, >>> .pwm_offt_low = ADP5589_PWM_OFFT_LOW, >>> .pwm_ont_low = ADP5589_PWM_ONT_LOW, >> >> I wonder how that didn't pop up during development of 75024f97e82e. I >> would expect that the driver doesn't work correctly in a very obvious >> way without this change?! I tend to want to send this to Linus before >> 6.18, but the question makes me wonder if I'm correct with that >> urgency. Any insights? > > Yeah, this one I kind of asked for Liu to test it (as I was not testing the PWM bits) > and he did tested it [2]. But it was v2 and that series had some more iterations. So > I suspect that I messed up along the way and the last version of the series was not > tested (for the PWM bits). 'b4 diff' tells us that you introduced the bug in v3 and I did test v2 although I didn't provide my Tested-by tag. b4 diff 20250521-dev-adp5589-fw-v4-20-f2c988d7a7a0@analog.com -v 2 3 | grep -C3 pwm_chip_info Using cached copy of the lookup --- Analyzing 203 messages in the thread --- Diffing v2 and v3 Running: git range-diff a99fa5bf804f..d382f21d8d7d e1940c40e7b0..4dbd46335b23 --- + return 0; + } ++static const struct adp5585_pwm_chip adp5589_pwm_chip_info = { ++ .pwm_cfg = ADP5585_PWM_CFG, ++ .pwm_offt_low = ADP5585_PWM_OFFT_LOW, ++ .pwm_ont_low = ADP5585_PWM_ONT_LOW, ++}; ++ ++static const struct adp5585_pwm_chip adp5585_pwm_chip_info = { ++ .pwm_cfg = ADP5589_PWM_CFG, ++ .pwm_offt_low = ADP5589_PWM_OFFT_LOW, ++ .pwm_ont_low = ADP5589_PWM_ONT_LOW, -- - { "adp5585-pwm" }, -+ { "adp5589-pwm" }, +- { "adp5585-pwm" }, ++ { "adp5585-pwm", (kernel_ulong_t)&adp5585_pwm_chip_info }, ++ { "adp5589-pwm", (kernel_ulong_t)&adp5589_pwm_chip_info }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(platform, adp5585_pwm_id_table); > > [2]: https://lore.kernel.org/linux-gpio/3efb68e2-7091-47e1-81a2-39930da5a427@nxp.com/ > - Nuno Sá > >> >> Best regards >> Uwe > -- Regards, Liu Ying ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-11-18 5:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-11-14 6:53 [PATCH] pwm: adp5585: correct mismatched pwm chip info ziniu.wang_1 2025-11-14 7:58 ` Liu Ying 2025-11-14 8:50 ` Nuno Sá 2025-11-14 9:30 ` Uwe Kleine-König 2025-11-14 9:46 ` Nuno Sá 2025-11-14 11:03 ` Uwe Kleine-König 2025-11-18 5:17 ` Liu Ying
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox