Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1577643

Re: [PATCH] leds: pca9532: Extend pca9532 device tree support

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: [PATCH] leds: pca9532: Extend pca9532 device tree support
Date 2017-02-09 15:30 +0100
Message-ID <t8XTr-7gc-15@gated-at.bofh.it> (permalink)
References <t8j9E-6xS-23@gated-at.bofh.it> <t8l1N-7If-51@gated-at.bofh.it> <t8Ee7-3aO-43@gated-at.bofh.it> <t8GpB-4sD-41@gated-at.bofh.it> <t8Td8-4n9-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] leds: pca9532: Extend pca9532 device tree support Felix Brack <fb@ltec.ch> - 2017-02-07 20:00 +0100
  Re: [PATCH] leds: pca9532: Extend pca9532 device tree support Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-02-07 22:00 +0100
    Re: [PATCH] leds: pca9532: Extend pca9532 device tree support Felix Brack <fb@ltec.ch> - 2017-02-08 18:30 +0100
      Re: [PATCH] leds: pca9532: Extend pca9532 device tree support Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-02-08 20:50 +0100
        Re: [PATCH] leds: pca9532: Extend pca9532 device tree support Felix Brack <fb@ltec.ch> - 2017-02-09 10:30 +0100
          Re: [PATCH] leds: pca9532: Extend pca9532 device tree support Pavel Machek <pavel@ucw.cz> - 2017-02-09 15:30 +0100
            Re: [PATCH] leds: pca9532: Extend pca9532 device tree support Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-02-09 22:20 +0100
            Re: [PATCH] leds: pca9532: Extend pca9532 device tree support Felix Brack <fb@ltec.ch> - 2017-02-10 17:30 +0100
          Re: [PATCH] leds: pca9532: Extend pca9532 device tree support Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-02-09 22:20 +0100

csiph-web