Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-04-01 Thread Enrico Weigelt, metux IT consult
On 27.03.21 10:46, Henning Schild wrote: In this case, they seem to be assigned to certain specific functions (by physical labels on the box), so IMHO the LED names should reflect that in some ways. The choice for "status" was because of /* Miscelleaus functions. Use functions above if you

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-27 Thread Henning Schild
Am Sat, 27 Mar 2021 12:16:23 +0100 schrieb Henning Schild : > Am Thu, 18 Mar 2021 11:25:10 +0100 > schrieb "Enrico Weigelt, metux IT consult" : > > > On 15.03.21 10:57, Henning Schild wrote: > > > > Hi, > > > > > diff --git a/drivers/leds/simple/simatic-ipc-leds.c > > >

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-27 Thread Henning Schild
Am Thu, 18 Mar 2021 11:25:10 +0100 schrieb "Enrico Weigelt, metux IT consult" : > On 15.03.21 10:57, Henning Schild wrote: > > Hi, > > > diff --git a/drivers/leds/simple/simatic-ipc-leds.c > > b/drivers/leds/simple/simatic-ipc-leds.c new file mode 100644 > > index ..0f7e6320e10d > >

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-27 Thread Henning Schild
Am Mon, 15 Mar 2021 12:19:15 +0100 schrieb Pavel Machek : > > > + struct led_classdev cdev; > > > +}; > > > + > > > +static struct simatic_ipc_led simatic_ipc_leds_io[] = { > > > + {1 << 15, "simatic-ipc:green:" LED_FUNCTION_STATUS "-1" }, > > > + {1 << 7, "simatic-ipc:yellow:"

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-27 Thread Henning Schild
Am Thu, 18 Mar 2021 12:38:53 +0100 schrieb "Enrico Weigelt, metux IT consult" : > On 15.03.21 12:19, Pavel Machek wrote: > > > But I still don't like the naming. simantic-ipc: prefix is > > useless. Having 6 status leds is not good, either. > > Do we have some standard naming policy those

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-26 Thread Henning Schild
Am Mon, 15 Mar 2021 12:48:19 +0200 schrieb Andy Shevchenko : > On Mon, Mar 15, 2021 at 11:57 AM Henning Schild > wrote: > > > > This driver adds initial support for several devices from Siemens. > > It is based on a platform driver introduced in an earlier commit. > > ... > > > +struct

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-23 Thread Henning Schild
Am Thu, 18 Mar 2021 13:40:58 +0100 schrieb Alexander Dahl : > Hei hei, > > > Enrico Weigelt, metux IT consult 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

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-18 Thread Alexander Dahl
Hei hei, > Enrico Weigelt, metux IT consult 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 > >

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-18 Thread Enrico Weigelt, metux IT consult
On 15.03.21 12:19, Pavel Machek wrote: But I still don't like the naming. simantic-ipc: prefix is useless. Having 6 status leds is not good, either. Do we have some standard naming policy those kinds of LEDs ? In this case, they seem to be assigned to certain specific functions (by physical

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-18 Thread Enrico Weigelt, metux IT consult
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

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-18 Thread Enrico Weigelt, metux IT consult
On 15.03.21 10:57, Henning Schild wrote: Hi, diff --git a/drivers/leds/simple/simatic-ipc-leds.c b/drivers/leds/simple/simatic-ipc-leds.c new file mode 100644 index ..0f7e6320e10d --- /dev/null +++ b/drivers/leds/simple/simatic-ipc-leds.c @@ -0,0 +1,210 @@ +//

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-15 Thread Henning Schild
Am Mon, 15 Mar 2021 12:19:15 +0100 schrieb Pavel Machek : > > > + struct led_classdev cdev; > > > +}; > > > + > > > +static struct simatic_ipc_led simatic_ipc_leds_io[] = { > > > + {1 << 15, "simatic-ipc:green:" LED_FUNCTION_STATUS "-1" }, > > > + {1 << 7, "simatic-ipc:yellow:"

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-15 Thread Andy Shevchenko
On Mon, Mar 15, 2021 at 1:19 PM Pavel Machek wrote: > > > + struct simatic_ipc_led *led = > > > + container_of(led_cd, struct simatic_ipc_led, cdev); > > > > One line? > > 80 columns. It is fine as it is. With the inline helper it will be possible to have this neat and

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-15 Thread Pavel Machek
> > + struct led_classdev cdev; > > +}; > > + > > +static struct simatic_ipc_led simatic_ipc_leds_io[] = { > > + {1 << 15, "simatic-ipc:green:" LED_FUNCTION_STATUS "-1" }, > > + {1 << 7, "simatic-ipc:yellow:" LED_FUNCTION_STATUS "-1" }, > > + {1 << 14, "simatic-ipc:red:"

Re: [PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-15 Thread Andy Shevchenko
On Mon, Mar 15, 2021 at 11:57 AM Henning Schild wrote: > > This driver adds initial support for several devices from Siemens. It is > based on a platform driver introduced in an earlier commit. ... > +struct simatic_ipc_led { > + unsigned int value; /* mask for io and offset for mem */ >

[PATCH v2 2/4] leds: simatic-ipc-leds: add new driver for Siemens Industial PCs

2021-03-15 Thread Henning Schild
This driver adds initial support for several devices from Siemens. It is based on a platform driver introduced in an earlier commit. Signed-off-by: Henning Schild --- drivers/leds/Kconfig | 3 + drivers/leds/Makefile | 3 + drivers/leds/simple/Kconfig