OSDN Git Service

leds: parse linux,default-trigger DT property in LED core
authorMarek Behún <marek.behun@nic.cz>
Sat, 19 Sep 2020 18:03:04 +0000 (20:03 +0200)
committerPavel Machek <pavel@ucw.cz>
Sat, 26 Sep 2020 19:56:43 +0000 (21:56 +0200)
commitc49d6cab0d7fde39297949c4da257db69999292e
treee81bed45437cbaec9dfd23e06ae0fffbad1e6552
parent006631969880fdc58a585d310c7e8d98dc648e47
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>
24 files changed:
drivers/leds/led-class.c
drivers/leds/leds-an30259a.c
drivers/leds/leds-aw2013.c
drivers/leds/leds-bcm6328.c
drivers/leds/leds-bcm6358.c
drivers/leds/leds-cr0014114.c
drivers/leds/leds-el15203000.c
drivers/leds/leds-gpio.c
drivers/leds/leds-is31fl32xx.c
drivers/leds/leds-lm3532.c
drivers/leds/leds-lm36274.c
drivers/leds/leds-lm3692x.c
drivers/leds/leds-lm3697.c
drivers/leds/leds-lp50xx.c
drivers/leds/leds-lp8860.c
drivers/leds/leds-lt3593.c
drivers/leds/leds-max77650.c
drivers/leds/leds-mt6323.c
drivers/leds/leds-ns2.c
drivers/leds/leds-pm8058.c
drivers/leds/leds-pwm.c
drivers/leds/leds-syscon.c
drivers/leds/leds-tlc591xx.c
drivers/leds/leds-turris-omnia.c