lkml.org 
[lkml]   [2021]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs
Hei hei,

> Enrico Weigelt, metux IT consult <lkml@metux.net> hat am 18.03.2021 11:27 geschrieben:
>
>
> On 15.03.21 11:48, Andy Shevchenko wrote:
>
> Hi,
>
> > I have a question, why we can't provide a GPIO driver which is already
> > in the kernel and, with use of the patch series I sent, to convert
> > this all magic to GPIO LEDs as it's done for all normal cases?
>
> Do we alread have a generic led driver that for cases that just
> set/clear bits in some mem/io location ? If not, that would be really
> great to have.

Yes, there is. Look out for compatible "register-bit-led" in device tree. That's from driver in drivers/leds/leds-syscon.c and you can use it inside a syscon node in dts.

It assumes one bit per LED.

Greets
Alex

\
 
 \ /
  Last update: 2021-03-18 13:42    [W:0.300 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site