[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <oo3pevzuyhrsf7t2ja7mxytaxhnthfar73iwvqxgawr5gjiudf@hbevzjog7akj>
Date: Fri, 30 May 2025 17:48:27 +0800
From: Longbin Li <looong.bin@...il.com>
To: Uwe Kleine-König <ukleinek@...nel.org>
Cc: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Chen Wang <unicorn_wang@...look.com>, Inochi Amaoto <inochiama@...il.com>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>, linux-pwm@...r.kernel.org,
devicetree@...r.kernel.org, sophgo@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org
Subject: Re: [PATCH v5 3/3] pwm: sophgo: add driver for SG2044
On Fri, May 30, 2025 at 09:50:25AM +0200, Uwe Kleine-König wrote:
> Hello,
>
> On Wed, May 28, 2025 at 06:11:38PM +0800, Longbin Li wrote:
> > Add PWM controller for SG2044 on base of SG2042.
> >
> > Signed-off-by: Longbin Li <looong.bin@...il.com>
> > Reviewed-by: Chen Wang <unicorn_wang@...look.com>
> > Tested-by: Chen Wang <unicorn_wang@...look.com>
>
> Nitpick: Make your S-o-b line the last line. This way you document that
> it was you who added the tags for Chen Wang.
>
Thank for remind.
> > [...]
> > +static int pwm_sg2044_apply(struct pwm_chip *chip, struct pwm_device *pwm,
> > + const struct pwm_state *state)
> > +{
> > + struct sg2042_pwm_ddata *ddata = pwmchip_get_drvdata(chip);
> > +
> > + pwm_sg2044_set_polarity(ddata, pwm, state);
> > +
> > + pwm_sg2042_set_dutycycle(chip, pwm, state);
> > +
> > + /*
> > + * re-enable PWMSTART to refresh the register period
> > + */
> > + pwm_sg2044_set_outputen(ddata, pwm, false);
>
> I'm astonished that checkpatch doesn't spot the wrong indention here.
>
I re-ran the checkpatch but no error. Maybe there is something wrong
in checkpatch.
> > +
> > + if (!state->enabled)
> > + return 0;
> > +
> > + pwm_sg2044_set_outputdir(ddata, pwm, true);
> > + pwm_sg2044_set_outputen(ddata, pwm, true);
> > +
> > + return 0;
> > +}
> > +
> > static const struct sg2042_chip_data sg2042_chip_data = {
> > .ops = {
> > .apply = pwm_sg2042_apply,
> > @@ -142,11 +215,22 @@ static const struct sg2042_chip_data sg2042_chip_data = {
> > }
> > };
> >
> > +static const struct sg2042_chip_data sg2044_chip_data = {
> > + .ops = {
> > + .apply = pwm_sg2044_apply,
> > + .get_state = pwm_sg2042_get_state,
> > + }
>
> Missing , after }.
>
> If you're ok, I'll pick up this version and fixup the two code changes
> and the order of the tags in the commit log.
>
> Best regards
> Uwe
Thanks, it's ok to go.
Best regards,
Longbin
Powered by blists - more mailing lists