All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Felix Brack <fb@ltec.ch>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	riku.voipio@iki.fi, rpurdie@rpsys.net,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	f.brack@eets.ch
Subject: Re: [PATCH] leds: pca9532: Extend pca9532 device tree support
Date: Thu, 9 Feb 2017 15:24:08 +0100	[thread overview]
Message-ID: <20170209142408.GB23373@xo-6d-61-c0.localdomain> (raw)
In-Reply-To: <3bfc9206-18c7-470b-ca53-d7bdb9a34f0a@ltec.ch>

Hi!

> >> This might be a misunderstanding. My patch is not meant to replace
> >> anything for driving the LEDs once the kernel is fully loaded. The LED
> >> subsystem offers quite a lot of possibilities to do this.
> >>
> >> My patch mainly deals with the 'default' state of the LEDs immediately
> >> when the driver gets loaded.
> >> Here is an example: I have a system with a LED named 'RUN' which is
> >> turned on steady by U-Boot (indicating "system booting"). When the
> >> PCA9532 driver loads this LED gets turned off due to initialization.
> >> However I would like it remain lit until later a script will make that
> >> 'RUN' LED blink (indicating "system running"). This script will of
> >> course use the existing LED subsystem to do so. To keep the 'RUN' LED
> >> lit I need the DT property 'default-state' being set to 'PCA9532_KEEP'.
> > 
> > It looks like all you need is default-state property.
> 
> For the example with keeping the 'RUN' led turned on, yes. However I
> would have to configure PSC and PWM registers to make the 'RUN' LED
> blink, for example.

Is that really useful? Keeping the state from u-boot until userland can take
control... ok, why not.

If it is useful, right, you can do it. But it will have to be generic for all
the LEDs, not like this.

You'll want something like

default_trigger = blinking;
default_trigger_parameters = < 2 sec on, 1 sec off >;

or something. You may want to coordinate with the USB LED people, which want
default triggers with parametrs.

									Pavel


									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2017-02-09 14:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 18:11 [PATCH] leds: pca9532: Extend pca9532 device tree support Felix Brack
2017-02-07 20:45 ` Jacek Anaszewski
2017-02-08 16:12   ` Felix Brack
2017-02-08 19:42     ` Jacek Anaszewski
2017-02-09  8:41       ` Felix Brack
2017-02-09 14:24         ` Pavel Machek [this message]
2017-02-09 21:04           ` Jacek Anaszewski
2017-02-10 16:26           ` Felix Brack
2017-02-09 21:10         ` Jacek Anaszewski
2017-03-29 14:26       ` Felix Brack
2017-03-29 18:29         ` 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=20170209142408.GB23373@xo-6d-61-c0.localdomain \
    --to=pavel@ucw.cz \
    --cc=f.brack@eets.ch \
    --cc=fb@ltec.ch \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=riku.voipio@iki.fi \
    --cc=rpurdie@rpsys.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.