lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 10 Feb 2017 17:26:32 +0100
From:   Felix Brack <fb@...c.ch>
To:     Pavel Machek <pavel@....cz>
Cc:     Jacek Anaszewski <jacek.anaszewski@...il.com>, riku.voipio@....fi,
        rpurdie@...ys.net, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: pca9532: Extend pca9532 device tree support

Hello Pavel, Hello Jacek

On 09.02.2017 15:24, Pavel Machek wrote:
> 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.
> 
>
Okay, I absolutely agree with you two. The driver should hide hardware
specific details (such as chip registers) as much as possible. My
approach does the opposite!
I will submit a new version of the patch that should conform much better
to existing DT bindings for LEDs.

many thanks, Felix

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ