lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y8eqPdifnWbMQI/T@spud>
Date:   Wed, 18 Jan 2023 08:13:49 +0000
From:   Conor Dooley <conor@...nel.org>
To:     Nylon Chen <nylon.chen@...ive.com>
Cc:     Jessica Clarke <jrtc27@...c27.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        nylon7717@...il.com, zong.li@...ive.com, greentime.hu@...ive.com,
        vincent.chen@...ive.com, Thierry Reding <thierry.reding@...il.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>, linux-pwm@...r.kernel.org
Subject: Re: [PATCH 0/2] Change PWM-controlled LED pin active mode and
 algorithm

Hey Nylon,

On Wed, Jan 18, 2023 at 10:32:25AM +0800, Nylon Chen wrote:
> Conor Dooley <conor@...nel.org> 於 2023年1月14日 週六 下午10:00寫道:
> > On Fri, Jan 13, 2023 at 07:24:56PM +0000, Jessica Clarke wrote:
> > > On 13 Jan 2023, at 18:32, Conor Dooley <conor@...nel.org> wrote:

> > > > Please delete link 2, convert the other two to standard Link: tags and
> > > > put this information in the dts patch. Possibly into the PWM patch too,
> > > > depending on what the PWM maintainers think.
> > > > This info should be in the commit history IMO and the commit message for
> > > > the dts patch says what's obvious from the diff without any explanation
> > > > as to why.
> > > >
> > > > I did a bit of looking around on lore, to see if I could figure out
> > > > why it was done like this in the first place, and I found:
> > > > https://lore.kernel.org/linux-pwm/CAJ2_jOG2M03aLBgUOgGjWH9CUxq2aTG97eSX70=UaSbGCMMF_g@mail.gmail.com/
> > >
> > > That DTS documentation makes no sense to me, why does what the LED is
> > > wired to matter?
> >
> > ```
> >       active-low:
> >         description:
> >           For PWMs where the LED is wired to supply rather than ground.
> > ```
> >
> > > Whether you have your transistor next to ground or
> > > next to Vdd doesn’t matter, what matters is whether the transistor is
> > > on or off. Maybe what they mean is whether the *PWM's output* / *the
> > > transistor's input* is pulled to ground or Vdd? In which case the
> > > property would indeed not apply here.
> > >
> > > Unless that’s written assuming the LED is wired directly to the PWM, in
> > > which case it would make sense, but that’s a very narrow-minded view of
> > > what the PWM output is (directly) driving.
> >
> > I would suspect that it was written with that assumption.
> > Probably was the case on the specific board this property was originally
> > added for.

> As you can see, there is also the same description in U-Boot.
> 
> But in U-Boot, the DTS of Unmatched/Unleashed has not been added active-low.
> 
> This is because active-high should be correct if we look at the circuit diagram.

I am loathe to speak for Jess, but I don't think either of us are
disagreeing with your patches. I was just trying to understand why it was
wrong in the first place to see if it was intentionally inverted, or if
there was something that could be improve to stop it happening again.
Apologies if that got lost in translation.

> > Maybe it'd be a bit more foolproof written as "For LEDs that are
> > illuminated while the PWM output is low. For example, where an LED is
> > wired between supply and the PWM output."?

Thanks,
Conor.


Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ