Commit graph

5 commits

Author SHA1 Message Date
Andy Shevchenko
e06ba23b05 leds: el15203000: Correct headers (of*.h -> mod_devicetable.h)
There is no user of of*.h headers, but mod_devicetable.h.
Update header block accordingly.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Oleh Kravchenko <oleg@kaa.org.ua>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-08-03 23:46:09 +02:00
Andy Shevchenko
e1012160bb leds: el15203000: Make error handling more robust
It's easy to miss necessary clean up, e.g. firmware node reference counting,
during error path in ->probe(). Make it more robust by moving to a single
point of return.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-05-28 12:05:29 +02:00
Andy Shevchenko
a43a4e588e leds: el15203000: Introduce to_el15203000_led() helper
Introduce a helper to replace open coded container_of() calls.
At the same time move ldev member to be first in the struct el15203000_led,
that makes container_of() effectivelly a no-op.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2021-05-28 11:59:59 +02:00
Marek Behún
c49d6cab0d leds: parse linux,default-trigger DT property in LED core
Do the parsing of `linux,default-trigger` DT property to LED core.
Currently it is done in many different drivers and the code is repeated.

This patch removes the parsing from 23 drivers:
  an30259a, aw2013, bcm6328, bcm6358, cr0014114, el15203000, gpio,
  is31fl32xx, lm3532, lm36274, lm3692x, lm3697, lp50xx, lp8860, lt3593,
  max77650, mt6323, ns2, pm8058, pwm, syscon, tlc591xx and turris-omnia.

There is one driver in drivers/input which parses this property on it's
own. I shall send a separate patch there after this is applied.

There are still 8 drivers that parse this property on their own because
they do not pass the led_init_data structure to the registering
function. I will try to refactor those in the future.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26 21:56:43 +02:00
Oleh Kravchenko
fc19967bcb leds: add LED driver for EL15203000 board
This patch adds a LED class driver for the LEDs found on
the Crane Merchandising System EL15203000 LEDs board
(aka RED LEDs board).

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
Reviewed-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
2019-11-03 17:37:06 +01:00