Linux-PWM Archive mirror
 help / color / mirror / Atom feed
From: Nylon Chen <nylon.chen@sifive.com>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: Emil Renner Berthing <emil.renner.berthing@canonical.com>,
	paul.walmsley@sifive.com,  palmer@dabbelt.com,
	conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	 robh+dt@kernel.org, u.kleine-koenig@pengutronix.de,
	thierry.reding@gmail.com,  aou@eecs.berkeley.edu,
	zong.li@sifve.com, vincent.chen@sifive.com,
	 linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
	 nylon7717@gmail.com
Subject: Re: [v6 1/3] riscv: dts: sifive: unleashed/unmatched: Remove PWM controlled LED's active-low properties
Date: Wed, 17 Jan 2024 14:37:30 +0800	[thread overview]
Message-ID: <CAHh=Yk_dye_KMXbug1VwYXU0Wm-mZgx_t-oJx1N0uYVByb1z7Q@mail.gmail.com> (raw)
In-Reply-To: <20240116-custard-drew-9a02e83d538a@wendy>

Conor Dooley <conor.dooley@microchip.com> 於 2024年1月16日 週二 下午6:45寫道:
>
> On Tue, Jan 16, 2024 at 02:20:57AM -0800, Emil Renner Berthing wrote:
> > Nylon Chen wrote:
> > > This removes the active-low properties of the PWM-controlled LEDs in
> > > the HiFive Unmatched device tree.
> > >
> > > The reference is hifive-unleashed-a00.pdf[0] and hifive-unmatched-schematics-v3.pdf[1].
> > >
> > > Link: https://sifive.cdn.prismic.io/sifive/c52a8e32-05ce-4aaf-95c8-7bf8453f8698_hifive-unleashed-a00-schematics-1.pdf [0]
> > > Link: https://sifive.cdn.prismic.io/sifive/6a06d6c0-6e66-49b5-8e9e-e68ce76f4192_hifive-unmatched-schematics-v3.pdf [1]
> > >
> > > Acked-by: Conor Dooley <conor.dooley@microchip.com>
> > > Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> > > Co-developed-by: Zong Li <zong.li@sifve.com>
> > > Signed-off-by: Zong Li <zong.li@sifve.com>
> > > Co-developed-by: Vincent Chen <vincent.chen@sifive.com>
> > > Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
> > > Signed-off-by: Nylon Chen <nylon.chen@sifive.com>
> > > ---
> > >  arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts |  8 ++++----
> > >  arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 12 ++++--------
> > >  2 files changed, 8 insertions(+), 12 deletions(-)
> > >
> > > diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
> > > index 900a50526d77..11e7ac1c54bb 100644
> > > --- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
> > > +++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
> > > @@ -49,7 +49,7 @@ led-controller {
> > >             compatible = "pwm-leds";
> > >
> > >             led-d1 {
> > > -                   pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>;
> > > +                   pwms = <&pwm0 0 7812500 0>;
> > >                     active-low;
> > >                     color = <LED_COLOR_ID_GREEN>;
> > >                     max-brightness = <255>;
> > > @@ -57,7 +57,7 @@ led-d1 {
> > >             };
> > >
> > >             led-d2 {
> > > -                   pwms = <&pwm0 1 7812500 PWM_POLARITY_INVERTED>;
> > > +                   pwms = <&pwm0 1 7812500 0>;
> > >                     active-low;
> > >                     color = <LED_COLOR_ID_GREEN>;
> > >                     max-brightness = <255>;
> > > @@ -65,7 +65,7 @@ led-d2 {
> > >             };
> > >
> > >             led-d3 {
> > > -                   pwms = <&pwm0 2 7812500 PWM_POLARITY_INVERTED>;
> > > +                   pwms = <&pwm0 2 7812500 0>;
> > >                     active-low;
> > >                     color = <LED_COLOR_ID_GREEN>;
> > >                     max-brightness = <255>;
> > > @@ -73,7 +73,7 @@ led-d3 {
> > >             };
> > >
> > >             led-d4 {
> > > -                   pwms = <&pwm0 3 7812500 PWM_POLARITY_INVERTED>;
> > > +                   pwms = <&pwm0 3 7812500 0>;
> > >                     active-low;
> > >                     color = <LED_COLOR_ID_GREEN>;
> > >                     max-brightness = <255>;
> > > diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> > > index 07387f9c135c..b328ee80693f 100644
> > > --- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> > > +++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> > > @@ -51,8 +51,7 @@ led-controller-1 {
> > >             compatible = "pwm-leds";
> > >
> > >             led-d12 {
> > > -                   pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>;
> > > -                   active-low;
> > > +                   pwms = <&pwm0 0 7812500 0>;
> >

Hi Emil and Conor, thanks for your feedback.
>
>
> > Here you remove the active-low property, but you don't above. I'm not sure
> > what's the right thing to do, but I would have expected the same change in both
> > places.
>
For this patch, all "active-low" should be deleted. This is my
mistake. I will fix it in the next version.
>
>
> Just to note, the original version of this that I acked/reviewed removed
> the property from all led nodes. I then apparently didn't look closely
> enough at v5 and left acked/reviewed tags on it too. It did not remove
> the active-low properties but this change was not mentioned in the
> changelog for the series.
Sorry Conor, I apologize for any confusion I may have caused.
>
> D4 on the unleashed and D12 on the unmatched have the same circuitry
> (modulo the placement of the series resistor) so I don't get why the
> property is being removed from only D12.
>
> I rescind my ack/review until that is clarified and/or fixed.
>
> Thanks,
> Conor.
>
>
> > >                     color = <LED_COLOR_ID_GREEN>;
> > >                     max-brightness = <255>;
> > >                     label = "d12";
> > > @@ -68,20 +67,17 @@ multi-led {
> > >                     label = "d2";
> > >
> > >                     led-red {
> > > -                           pwms = <&pwm0 2 7812500 PWM_POLARITY_INVERTED>;
> > > -                           active-low;
> > > +                           pwms = <&pwm0 2 7812500 0>;
> > >                             color = <LED_COLOR_ID_RED>;
> > >                     };
> > >
> > >                     led-green {
> > > -                           pwms = <&pwm0 1 7812500 PWM_POLARITY_INVERTED>;
> > > -                           active-low;
> > > +                           pwms = <&pwm0 1 7812500 0>;
> > >                             color = <LED_COLOR_ID_GREEN>;
> > >                     };
> > >
> > >                     led-blue {
> > > -                           pwms = <&pwm0 3 7812500 PWM_POLARITY_INVERTED>;
> > > -                           active-low;
> > > +                           pwms = <&pwm0 3 7812500 0>;
> > >                             color = <LED_COLOR_ID_BLUE>;
> > >                     };
> > >             };
> > > --
> > > 2.42.0
> > >
> > >
> > > _______________________________________________
> > > linux-riscv mailing list
> > > linux-riscv@lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2024-01-17  6:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16  4:10 [v6 0/3] Change PWM-controlled LED pin active mode and algorithm Nylon Chen
2024-01-16  4:10 ` [v6 1/3] riscv: dts: sifive: unleashed/unmatched: Remove PWM controlled LED's active-low properties Nylon Chen
2024-01-16 10:20   ` Emil Renner Berthing
2024-01-16 10:44     ` Conor Dooley
2024-01-17  6:37       ` Nylon Chen [this message]
2024-01-16  4:10 ` [v6 2/3] pwm: sifive: change the PWM controlled LED algorithm Nylon Chen
2024-01-16  4:10 ` [v6 3/3] pwm: sifive: Fix the error in the idempotent test within the pwm_apply_state_debug function Nylon Chen

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='CAHh=Yk_dye_KMXbug1VwYXU0Wm-mZgx_t-oJx1N0uYVByb1z7Q@mail.gmail.com' \
    --to=nylon.chen@sifive.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=emil.renner.berthing@canonical.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=nylon7717@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vincent.chen@sifive.com \
    --cc=zong.li@sifve.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).