Linux-Amlogic Archive on lore.kernel.org
 help / color / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Mohammad Rasim <mohammad.rasim96@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-amlogic@lists.infradead.org
Subject: Re: [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for
Date: Sat, 30 Nov 2019 20:25:26 +0100
Message-ID: <CAFBinCD4otHpey+A3G2sdo1K-Z8Ed6OSa2BerW-q7t9irZPnvg@mail.gmail.com> (raw)
In-Reply-To: <20191130190702.52zjhlh65gpq2ugj@manjaro.localdomain>

On Sat, Nov 30, 2019 at 8:07 PM Mohammad Rasim
<mohammad.rasim96@gmail.com> wrote:
[...]
> > > > > +       leds {
> > > > > +               compatible = "gpio-leds";
> > > > > +               red {
> > > > > +                       label = "status";
> > > > this property seems to be deprecated now, see
> > > > Documentation/devicetree/bindings/leds/common.txt
> > > > but I'm not sure whether Kevin has made a decision yet when to not
> > > > accept "label" properties here anymore
> > > OK, I will remove the deprecated property
> > > but I'm not sure what should I choose as a function, LED_FUNCTION_STATUS
> > > or LED_FUNCTION_ACTIVITY ?
> > I haven't used function and color myself but I believe it works like
> > this (untested):
> > - add an #include <dt-bindings/leds/common.h> next to the other
> > #includes (keep alphabetical ordering). this include file also
> > contains all the #defines for color and function
> > - add a color property, for example: color = <LED_COLOR_ID_RED>;
> > - add a function property, for example: function = <LED_FUNCTION_STATUS>;
> > - test, debug and fix potential issues ;)
> Yes, I've already tested it but I'm just not sure what should be in the
> function property, LED_FUNCTION_STATUS and LED_FUNCTION_ACTIVITY both
> seem like good choices,
I haven't considered "activity" before, but most of our boards with
some kind of status LED use status in the label
unless someone objects: choose the one you like most

[...]
> if this property only used to lable the led then LED_FUNCTION_STATUS is
> ok, but maybe this is used by userspace to trigger the led ?!
in general devicetree describes hardware
I don't know if userspace does something "automatically" based on the
function. however, my expectation is that the trigger from
"linux,default-trigger" is used (if set) and that you can change the
trigger from userspace manually (if you wish)


Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-30 11:58 [PATCH v3 0/2] add support for videostrong KII Pro Mohammad Rasim
2019-11-30 11:58 ` [PATCH v3 1/2] dt-bindings: Add vendor prefix for Videostrong Mohammad Rasim
2019-11-30 13:45   ` Martin Blumenstingl
2019-11-30 17:11     ` Mohammad Rasim
2019-11-30 11:58 ` [PATCH v3 2/2] arm64: dts: meson-gxbb: add support for Mohammad Rasim
2019-11-30 13:59   ` Martin Blumenstingl
2019-11-30 17:47     ` Mohammad Rasim
2019-11-30 18:57       ` Martin Blumenstingl
2019-11-30 19:07         ` Mohammad Rasim
2019-11-30 19:12           ` Mohammad Rasim
2019-11-30 19:25           ` Martin Blumenstingl [this message]
2019-11-30 14:00 ` [PATCH v3 0/2] add support for videostrong KII Pro Martin Blumenstingl
2019-11-30 17:51   ` Mohammad Rasim

Reply instructions:

You may reply publically 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=CAFBinCD4otHpey+A3G2sdo1K-Z8Ed6OSa2BerW-q7t9irZPnvg@mail.gmail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mohammad.rasim96@gmail.com \
    --cc=narmstrong@baylibre.com \
    --cc=robh+dt@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

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org
	public-inbox-index linux-amlogic

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git