lkml.org 
[lkml]   [2022]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] dt-bindings: leds: register-bit-led: Add value property
On Monday 11 July 2022 14:06:50 Linus Walleij wrote:
> On Wed, Jul 6, 2022 at 6:23 PM Pali Rohár <pali@kernel.org> wrote:
> > On Wednesday 06 July 2022 10:21:11 Rob Herring wrote:
> > > On Wed, Jul 06, 2022 at 01:28:27PM +0200, Pali Rohár wrote:
> > > > Allow to define inverted logic (0 - enable LED, 1 - disable LED) via value
> > > > property. This property name is already used by other syscon drivers, e.g.
> > > > syscon-reboot.
> > >
> > > Yes, but those are potentially multi-bit values. This is a single bit
> > > value, and the only value that's ever needed is 0. Why not just use
> > > 'active-low' here?
> >
> > Just because to have uniform definitions across more syscon nodes.
>
> But what happens if he mask and value don't line up?
>
> mask = 0x10;
> value = 0x08;

Same what would happen in other drivers, no?

Only those value bits are take into account which are also sets in the mask.

> If you just state active-low; this kind of mistake is not possible to make.
>
> So I'd rather go for active-low;
>
> Yours,
> Linus Walleij

\
 
 \ /
  Last update: 2022-07-11 14:11    [W:0.045 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site