* [PATCH] pwm: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT
@ 2025-08-16 10:49 Xi Ruoyao
2025-08-17 10:59 ` Uwe Kleine-König
0 siblings, 1 reply; 7+ messages in thread
From: Xi Ruoyao @ 2025-08-16 10:49 UTC (permalink / raw)
To: Binbin Zhou, Uwe Kleine-König
Cc: Huacai Chen, Xuerui Wang, linux-pwm, loongarch, linux-kernel,
Xi Ruoyao
Per the 7A1000 and 7A2000 user manual, the clock frequency of their
PWM controllers is 50 MHz, not 50 kHz.
Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---
drivers/pwm/pwm-loongson.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-loongson.c b/drivers/pwm/pwm-loongson.c
index 1ba16168cbb4..31a57edecfd0 100644
--- a/drivers/pwm/pwm-loongson.c
+++ b/drivers/pwm/pwm-loongson.c
@@ -49,7 +49,7 @@
#define LOONGSON_PWM_CTRL_REG_DZONE BIT(10) /* Anti-dead Zone Enable Bit */
/* default input clk frequency for the ACPI case */
-#define LOONGSON_PWM_FREQ_DEFAULT 50000 /* Hz */
+#define LOONGSON_PWM_FREQ_DEFAULT 50000000 /* Hz */
struct pwm_loongson_ddata {
struct clk *clk;
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] pwm: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT
2025-08-16 10:49 [PATCH] pwm: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT Xi Ruoyao
@ 2025-08-17 10:59 ` Uwe Kleine-König
2025-08-18 9:38 ` Binbin Zhou
0 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2025-08-17 10:59 UTC (permalink / raw)
To: Xi Ruoyao
Cc: Binbin Zhou, Juxin Gao, Huacai Chen, Xuerui Wang, linux-pwm,
loongarch, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 536 bytes --]
Hello,
[adding Juxin Gao to Cc:]
On Sat, Aug 16, 2025 at 06:49:05PM +0800, Xi Ruoyao wrote:
> Per the 7A1000 and 7A2000 user manual, the clock frequency of their
> PWM controllers is 50 MHz, not 50 kHz.
>
> Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
A quick glimpse into
https://loongson.github.io/LoongArch-Documentation/Loongson-7A1000-usermanual-EN.pdf
confirms this, so I tend to apply it. I'll wait a bit to give the people
involved in 2b62c89448dd a chance to comment.
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: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT
2025-08-17 10:59 ` Uwe Kleine-König
@ 2025-08-18 9:38 ` Binbin Zhou
2025-08-20 6:36 ` Uwe Kleine-König
0 siblings, 1 reply; 7+ messages in thread
From: Binbin Zhou @ 2025-08-18 9:38 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Xi Ruoyao, Binbin Zhou, Juxin Gao, Huacai Chen, Xuerui Wang,
linux-pwm, loongarch, linux-kernel
Hi Xi:
Thanks for your patch.
On Sun, Aug 17, 2025 at 6:59 PM Uwe Kleine-König <ukleinek@kernel.org> wrote:
>
> Hello,
>
> [adding Juxin Gao to Cc:]
>
> On Sat, Aug 16, 2025 at 06:49:05PM +0800, Xi Ruoyao wrote:
> > Per the 7A1000 and 7A2000 user manual, the clock frequency of their
> > PWM controllers is 50 MHz, not 50 kHz.
> >
> > Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
I have confirmed once again that this was indeed my mistake. Thank you again!
Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
>
> A quick glimpse into
> https://loongson.github.io/LoongArch-Documentation/Loongson-7A1000-usermanual-EN.pdf
> confirms this, so I tend to apply it. I'll wait a bit to give the people
> involved in 2b62c89448dd a chance to comment.
>
> Best regards
> Uwe
--
Thanks.
Binbin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pwm: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT
2025-08-18 9:38 ` Binbin Zhou
@ 2025-08-20 6:36 ` Uwe Kleine-König
2025-08-20 7:14 ` Xi Ruoyao
2025-08-20 7:33 ` Binbin Zhou
0 siblings, 2 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2025-08-20 6:36 UTC (permalink / raw)
To: Binbin Zhou
Cc: Xi Ruoyao, Binbin Zhou, Juxin Gao, Huacai Chen, Xuerui Wang,
linux-pwm, loongarch, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]
Hi Binbin,
On Mon, Aug 18, 2025 at 05:38:34PM +0800, Binbin Zhou wrote:
> On Sun, Aug 17, 2025 at 6:59 PM Uwe Kleine-König <ukleinek@kernel.org> wrote:
> >
> > Hello,
> >
> > [adding Juxin Gao to Cc:]
> >
> > On Sat, Aug 16, 2025 at 06:49:05PM +0800, Xi Ruoyao wrote:
> > > Per the 7A1000 and 7A2000 user manual, the clock frequency of their
> > > PWM controllers is 50 MHz, not 50 kHz.
> > >
> > > Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
>
> I have confirmed once again that this was indeed my mistake. Thank you again!
>
> Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
Thanks for your confirmation.
My gut feeling is that this isn't very urgent and taking this as merge
window material for 6.18-rc1 is fine. I still applied it to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/fixes
and will send it along if something more urgent pops up. Please tell me
if you think I should bother Linus with it and get it into 6.17.
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: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT
2025-08-20 6:36 ` Uwe Kleine-König
@ 2025-08-20 7:14 ` Xi Ruoyao
2025-08-20 7:33 ` Binbin Zhou
1 sibling, 0 replies; 7+ messages in thread
From: Xi Ruoyao @ 2025-08-20 7:14 UTC (permalink / raw)
To: Uwe Kleine-König, Binbin Zhou
Cc: Binbin Zhou, Juxin Gao, Huacai Chen, Xuerui Wang, linux-pwm,
loongarch, linux-kernel
On Wed, 2025-08-20 at 08:36 +0200, Uwe Kleine-König wrote:
> Hi Binbin,
>
> On Mon, Aug 18, 2025 at 05:38:34PM +0800, Binbin Zhou wrote:
> > On Sun, Aug 17, 2025 at 6:59 PM Uwe Kleine-König <ukleinek@kernel.org> wrote:
> > >
> > > Hello,
> > >
> > > [adding Juxin Gao to Cc:]
> > >
> > > On Sat, Aug 16, 2025 at 06:49:05PM +0800, Xi Ruoyao wrote:
> > > > Per the 7A1000 and 7A2000 user manual, the clock frequency of their
> > > > PWM controllers is 50 MHz, not 50 kHz.
> > > >
> > > > Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
> >
> > I have confirmed once again that this was indeed my mistake. Thank you again!
> >
> > Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
>
> Thanks for your confirmation.
>
> My gut feeling is that this isn't very urgent and taking this as merge
> window material for 6.18-rc1 is fine. I still applied it to
> https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/fixes
> and will send it along if something more urgent pops up. Please tell me
> if you think I should bother Linus with it and get it into 6.17.
Just FYI: the issue was detected when I debugged a screen flickering
with a downstream backlight control driver. As this backlight control
driver is not upstream yet anyway I don't see an emergency myself.
--
Xi Ruoyao <xry111@xry111.site>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pwm: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT
2025-08-20 6:36 ` Uwe Kleine-König
2025-08-20 7:14 ` Xi Ruoyao
@ 2025-08-20 7:33 ` Binbin Zhou
2025-08-22 4:20 ` Huacai Chen
1 sibling, 1 reply; 7+ messages in thread
From: Binbin Zhou @ 2025-08-20 7:33 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Xi Ruoyao, Binbin Zhou, Juxin Gao, Huacai Chen, Xuerui Wang,
linux-pwm, loongarch, linux-kernel
Hi Uwe:
On Wed, Aug 20, 2025 at 2:36 PM Uwe Kleine-König <ukleinek@kernel.org> wrote:
>
> Hi Binbin,
>
> On Mon, Aug 18, 2025 at 05:38:34PM +0800, Binbin Zhou wrote:
> > On Sun, Aug 17, 2025 at 6:59 PM Uwe Kleine-König <ukleinek@kernel.org> wrote:
> > >
> > > Hello,
> > >
> > > [adding Juxin Gao to Cc:]
> > >
> > > On Sat, Aug 16, 2025 at 06:49:05PM +0800, Xi Ruoyao wrote:
> > > > Per the 7A1000 and 7A2000 user manual, the clock frequency of their
> > > > PWM controllers is 50 MHz, not 50 kHz.
> > > >
> > > > Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
> >
> > I have confirmed once again that this was indeed my mistake. Thank you again!
> >
> > Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
>
> Thanks for your confirmation.
>
> My gut feeling is that this isn't very urgent and taking this as merge
> window material for 6.18-rc1 is fine. I still applied it to
> https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/fixes
> and will send it along if something more urgent pops up. Please tell me
> if you think I should bother Linus with it and get it into 6.17.
I don't think it's urgent either, so just take it as the merge window
material for 6.18-rc1.
>
> Best regards
> Uwe
--
Thanks.
Binbin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pwm: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT
2025-08-20 7:33 ` Binbin Zhou
@ 2025-08-22 4:20 ` Huacai Chen
0 siblings, 0 replies; 7+ messages in thread
From: Huacai Chen @ 2025-08-22 4:20 UTC (permalink / raw)
To: Binbin Zhou
Cc: Uwe Kleine-König, Xi Ruoyao, Binbin Zhou, Juxin Gao,
Xuerui Wang, linux-pwm, loongarch, linux-kernel
On Wed, Aug 20, 2025 at 3:34 PM Binbin Zhou <zhoubb.aaron@gmail.com> wrote:
>
> Hi Uwe:
>
> On Wed, Aug 20, 2025 at 2:36 PM Uwe Kleine-König <ukleinek@kernel.org> wrote:
> >
> > Hi Binbin,
> >
> > On Mon, Aug 18, 2025 at 05:38:34PM +0800, Binbin Zhou wrote:
> > > On Sun, Aug 17, 2025 at 6:59 PM Uwe Kleine-König <ukleinek@kernel.org> wrote:
> > > >
> > > > Hello,
> > > >
> > > > [adding Juxin Gao to Cc:]
> > > >
> > > > On Sat, Aug 16, 2025 at 06:49:05PM +0800, Xi Ruoyao wrote:
> > > > > Per the 7A1000 and 7A2000 user manual, the clock frequency of their
> > > > > PWM controllers is 50 MHz, not 50 kHz.
> > > > >
> > > > > Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
> > >
> > > I have confirmed once again that this was indeed my mistake. Thank you again!
> > >
> > > Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
> >
> > Thanks for your confirmation.
> >
> > My gut feeling is that this isn't very urgent and taking this as merge
> > window material for 6.18-rc1 is fine. I still applied it to
> > https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/fixes
> > and will send it along if something more urgent pops up. Please tell me
> > if you think I should bother Linus with it and get it into 6.17.
>
> I don't think it's urgent either, so just take it as the merge window
> material for 6.18-rc1.
My opinion, if there are other pwm fix patches, this one can go into
6.17 together; otherwise just go into 6.18.
And if not too late, just add
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Huacai
> >
> > Best regards
> > Uwe
>
> --
> Thanks.
> Binbin
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-08-22 4:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-16 10:49 [PATCH] pwm: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT Xi Ruoyao
2025-08-17 10:59 ` Uwe Kleine-König
2025-08-18 9:38 ` Binbin Zhou
2025-08-20 6:36 ` Uwe Kleine-König
2025-08-20 7:14 ` Xi Ruoyao
2025-08-20 7:33 ` Binbin Zhou
2025-08-22 4:20 ` Huacai Chen
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).