From: "Thomas Bonnefille" <thomas.bonnefille@bootlin.com>
To: "Inochi Amaoto" <inochiama@gmail.com>,
"Uwe Kleine-König" <ukleinek@kernel.org>,
"Jingbao Qiu" <qiujingbao.dlmu@gmail.com>
Cc: <robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>,
<unicorn_wang@outlook.com>, <dlan@gentoo.org>,
<linux-pwm@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 2/2] pwm: sophgo: add pwm support for Sophgo CV1800 SoC
Date: Tue, 08 Apr 2025 09:54:27 +0200 [thread overview]
Message-ID: <D913G6I023M1.NLMLJDZ1PYSA@bootlin.com> (raw)
In-Reply-To: <j74t2zqvoslo5fgmea4kp434tafgchkncytofj65zbbt7ivcqy@auboc3pkdiz3>
On Mon Apr 7, 2025 at 9:21 AM CEST, Inochi Amaoto wrote:
> On Sun, Apr 06, 2025 at 02:16:41AM +0200, Thomas Bonnefille wrote:
>> Hello,
>>
>> On Sat Jun 1, 2024 at 1:53 PM CEST, Uwe Kleine-König wrote:
>> > On Wed, May 01, 2024 at 04:32:42PM +0800, Jingbao Qiu wrote:
>> >> [...]
>> >> + if ((state & BIT(pwm->hwpwm)) && enable)
>> >> + regmap_update_bits(priv->map, PWM_CV1800_OE,
>> >> + PWM_CV1800_OE_MASK(pwm->hwpwm),
>> >> + PWM_CV1800_REG_ENABLE(pwm->hwpwm));
>> >
>> > This looks strange. If BIT(hwpwm) is already set, set it again?!
>> > Also if you used the caching implemented in regmap, you don't need to
>> > make this conditional.
>> >
>>
>> I was testing the series and noticed indeed an issue in this driver at
>> those lines. If PWM_CV1800_OE isn't set by something else than the
>> kernel it will never be set and so, there will never be a PWM outputted.
>>
>> Using :
>> if (!(state & BIT(pwm->hwpwm)) && enable)
>> Solved the issue but as Uwe said you can probably rely on regmap caching
>> to avoid this condition.
>>
>> >
>> > ...
>> >
>>
>> Do you plan on sending a new iteration some day ? I may have some time
>> to continue the upstreaming process if you need to.
>>
>> Thank you for this series !
>> Thomas
>
> I suggest checking existing spi-sg2044-nor driver, which may reduce your
> work for upstreaming.
>
> Regards,
> Inochi
Hello Inochi,
Thank you very much, however even after reading it I can't see the link
between the SPI NOR controller driver of the SG2044 and the PWM driver
for the CV18XX series ?
Regards,
Thomas
next prev parent reply other threads:[~2025-04-08 7:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 8:32 [PATCH v7 0/2] riscv: pwm: sophgo: add pwm support for CV1800 Jingbao Qiu
2024-05-01 8:32 ` [PATCH v7 1/2] dt-bindings: pwm: sophgo: add pwm for Sophgo CV1800 series SoC Jingbao Qiu
2024-05-01 8:32 ` [PATCH v7 2/2] pwm: sophgo: add pwm support for Sophgo CV1800 SoC Jingbao Qiu
2024-06-01 11:53 ` Uwe Kleine-König
2025-04-06 0:16 ` Thomas Bonnefille
2025-04-07 5:38 ` Jingbao Qiu
2025-04-09 6:25 ` Chen Wang
2025-04-07 7:21 ` Inochi Amaoto
2025-04-08 7:54 ` Thomas Bonnefille [this message]
2025-04-08 10:15 ` Inochi Amaoto
2024-05-03 1:47 ` [PATCH v7 0/2] riscv: pwm: sophgo: add pwm support for CV1800 Chen Wang
2024-05-04 6:49 ` Jingbao Qiu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D913G6I023M1.NLMLJDZ1PYSA@bootlin.com \
--to=thomas.bonnefille@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=inochiama@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=qiujingbao.dlmu@gmail.com \
--cc=robh@kernel.org \
--cc=ukleinek@kernel.org \
--cc=unicorn_wang@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox