From: Chen Wang <chen.wang@linux.dev>
To: Hiago De Franco <hfranco@baylibre.com>
Cc: "Uwe Kleine-König" <ukleinek@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Inochi Amaoto" <inochiama@gmail.com>,
"Paul Walmsley" <pjw@kernel.org>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Chen Wang" <unicorn_wang@outlook.com>,
linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
sophgo@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH 2/3] pwm: sophgo-sg2042: add support for CV1800B
Date: Tue, 1 Dec 2026 07:57:23 +0800 [thread overview]
Message-ID: <8a80695b-cac3-4db0-818a-327c945379e1@linux.dev> (raw)
In-Reply-To: <mojdxlx4qtvuus4aovisurzq47xlm23r6qbjgn5dlhgmyxtucj@3niteqgkaq54>
On 11/30/2026 8:57 PM, Hiago De Franco wrote:
> Hi Chen,
>
> On Mon, Nov 30, 2026 at 01:30:55PM +0800, Chen Wang wrote:
>> On 11/17/2026 8:57 PM, Hiago De Franco wrote:
>>
[......]
>>> /**
>>> * struct sg2042_pwm_ddata - private driver data
>>> * @base: base address of mapped PWM registers
>>> @@ -155,6 +168,14 @@ static void pwm_sg2044_set_outputen(struct sg2042_pwm_ddata *ddata, struct pwm_d
>>> writel(pwmstart, ddata->base + SG2044_PWM_PWMSTART);
>>> }
>>> +static bool pwm_sg2044_get_outputen(struct sg2042_pwm_ddata *ddata,
>>> + struct pwm_device *pwm)
>>> +{
>>> + u32 pwmstart = readl(ddata->base + SG2044_PWM_PWMSTART);
>>> +
>>> + return !!(pwmstart & BIT(pwm->hwpwm));
>>> +}
>>> +
>> `pwm_sg2044_get_outputen` is only called in pwm_cv1800b_xxx, why not name it
>> as pwm_cv1800b_get_outputen and put it together wtih pwm_cv1800b_xxx
>> functions?
> In this case I was not entirely sure and got confused with the names. I
> agree with you, but pwm_sg2044_set_outputen already exists and
> pwm_sg2044_get_outputen is just the a get function for
> SG2044_PWM_PWMSTART. So for this specific case I believe keeping it as
> pwm_sg2044_get_outputen would be more accurate, what do you think?
Agreed; please maintain the original naming convention.
[......]
Thanks,
Chen
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-11-30 23:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 12:57 [PATCH 0/3] Add PWM support for the Sophgo CV1800B Hiago De Franco
2026-11-17 12:57 ` [PATCH 1/3] dt-bindings: pwm: sophgo: add PWM controller for CV1800B Hiago De Franco
2026-11-17 17:28 ` Conor Dooley
2026-11-17 12:57 ` [PATCH 2/3] pwm: sophgo-sg2042: add support " Hiago De Franco
2026-11-30 5:30 ` Chen Wang
2026-11-30 12:57 ` Hiago De Franco
2026-11-30 23:57 ` Chen Wang [this message]
2026-11-17 12:57 ` [PATCH 3/3] riscv: dts: sophgo: cv180x: add PWM controller nodes Hiago De Franco
2026-11-30 5:34 ` Chen Wang
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=8a80695b-cac3-4db0-818a-327c945379e1@linux.dev \
--to=chen.wang@linux.dev \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hfranco@baylibre.com \
--cc=inochiama@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=sophgo@lists.linux.dev \
--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