From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
To: Jacek Anaszewski
<jacek.anaszewski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jelle Martijn Kok <jmkok-i3KCcyIX/XtmR6Xm/wNWPw@public.gmane.org>,
linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH] leds-pwm: the startup brightness can be specified
Date: Fri, 10 Feb 2017 21:56:14 +0100 [thread overview]
Message-ID: <20170210205614.GA6576@amd> (raw)
In-Reply-To: <c4aebca4-d5a1-aaa7-d69b-8d0e4d4d8ba8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]
Hi!
> > + led.default_brightness = LED_OFF;
> > + of_property_read_u32(child, "brightness",
> > + &led.default_brightness);
>
> At first you would have to submit a patch for
> Documentation/devicetree/bindings/leds/common.txt that would add
> brightness property. The question is whether it is really needed?
> You can set brightness from userspace via sysfs API.
>
> By the way, I have a question to DT maintainers: is DT a proper
> place for defining this type of configuration that can be set via
> userspace scripts? Shouldn't DT describe only hardware properties and
> constraints resulting from board configuration?
Well, if the hardware has label "half - power, full - transmitting" on
a LED, we might want kernel to turn it to half power on bootup.
If you have a "disk activity LED" on a PC, it is driven by
hardware. On arm notebook, it would be nice if "disk activity LED"
worked, too. Preferably even when running fsck in init=/bin/bash
mode. We already provide that, AFAICT, so having ability to set
constant brightness sounds sane to me.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-02-10 20:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <aed1129a-993a-91d9-7b14-13c3424ee0f4@solutionsradio.com>
[not found] ` <aed1129a-993a-91d9-7b14-13c3424ee0f4-Cb7RZHV19h6nMLx/lKYAZdBPR1lH4CV8@public.gmane.org>
2017-02-09 21:31 ` [PATCH] leds-pwm: the startup brightness can be specified Jacek Anaszewski
[not found] ` <c4aebca4-d5a1-aaa7-d69b-8d0e4d4d8ba8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-10 20:56 ` Pavel Machek [this message]
2017-02-14 10:34 ` Jelle Martijn Kok
[not found] ` <74325158-79f6-ff2a-832e-9f2ece1cf853-i3KCcyIX/XtmR6Xm/wNWPw@public.gmane.org>
2017-02-14 21:13 ` Jacek Anaszewski
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=20170210205614.GA6576@amd \
--to=pavel-+zi9xunit7i@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jacek.anaszewski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jmkok-i3KCcyIX/XtmR6Xm/wNWPw@public.gmane.org \
--cc=linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).