Devicetree
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Rob Herring" <robh@kernel.org>, "Pavel Machek" <pavel@ucw.cz>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Marek Behún" <kabel@kernel.org>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: leds: register-bit-led: Add value property
Date: Mon, 11 Jul 2022 14:10:06 +0200	[thread overview]
Message-ID: <20220711121006.kjk44rubi5gpqycj@pali> (raw)
In-Reply-To: <CACRpkdYncdsVW8LysQ3--rOF-KUF6dkkPyX4tg4e10vn2K+8FQ@mail.gmail.com>

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

  reply	other threads:[~2022-07-11 12:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 11:28 [PATCH 1/2] dt-bindings: leds: register-bit-led: Add value property Pali Rohár
2022-07-06 11:28 ` [PATCH 2/2] leds: syscon: Implement support for " Pali Rohár
2022-07-06 16:21 ` [PATCH 1/2] dt-bindings: leds: register-bit-led: Add " Rob Herring
2022-07-06 16:23   ` Pali Rohár
2022-07-11 12:06     ` Linus Walleij
2022-07-11 12:10       ` Pali Rohár [this message]
2022-07-11 12:21         ` Linus Walleij

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=20220711121006.kjk44rubi5gpqycj@pali \
    --to=pali@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kabel@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    /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