[PATCH leds v2 00/50] Start moving parsing of `linux,default-trigger` to LED core (a cleanup of LED drivers)

Marek Behún
2020-09-17T22:34:06Z

Hi,

this series is also available at [1].

This is v2, you can read cover letter of v1 at [2] (togehter with
explanation of why I did this).

Changes since v1:
- split big changes into several patches of little changes
- added many cosmetic fixes (helper variables, reversal christmas tree
variables declaration, ...)
- fixed some bugs in various drivers (memory leaks, iteration over
unavailable OF nodes)
- made some drivers compilable when COMPILE_TEST=y (since allyesconfig
did not compile them). Not all though, some still don't compile with
allyesconfig
- the commit that moves parsing of `linux,default-trigger` property from
drivers to LED core is now last in the series, instead of first

Marek

[1] https://git.kernel.org/pub/scm/linux/kernel/git/kabel/linux.git/log/?h=leds-cleanup-for-pavel
[2] https://lore.kernel.org/linux-leds/20200916231650.11484-1-marek.behun@nic.cz/T/#m826493318174b0f38a3d4ba107092b5420ce440c

Cc: Álvaro Fernández Rojas <noltari@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Andrey Utkin <andrey_utkin@fastmail.com>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Baolin Wang <baolin.wang@linaro.org>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Christian Mauderer <oss@c-mauderer.de>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: David Rivshin <drivshin@allworx.com>
Cc: Grant Feng <von81@163.com>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: H. Nikolaus Schaller <hns@goldelico.com>
Cc: Jaedon Shin <jaedon.shin@gmail.com>
Cc: John Crispin <john@phrozen.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Milo Kim <milo.kim@ti.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Nikita Travkin <nikitos.tr@gmail.com>
Cc: Orson Zhai <orsonzhai@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Philippe Retornaz <philippe.retornaz@epfl.ch>
Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: Rod Whitby <rod@whitby.id.au>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Simon Guinot <sguinot@lacie.com>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Simon Shields <simon@lineageos.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Cc: Vincent Donnefort <vdonnefort@gmail.com>
Cc: Xiaotong Lu <xiaotong.lu@spreadtrum.com>

Marek Behún (50):
leds: various: compile if COMPILE_TEST=y
leds: ip30: compile if COMPILE_TEST=y
leds: fsg: compile if COMPILE_TEST=y
leds: various: use device_get_match_data
leds: various: guard of_match_table member value with of_match_ptr
leds: various: use dev_of_node(dev) instead of dev->of_node
leds: lt3593: do not rewrite .of_node of new LED device to wrong value
leds: various: use only available OF children
leds: various: fix OF node leaks
leds: bcm6328, bcm6358: use devres LED registering function
leds: bcm6328, bcm6358: use struct led_init_data when registering
leds: bcm6328: cosmetic: use reverse christmas tree
leds: bcm6358: cosmetic: use reverse christmas tree
leds: lm3697: use struct led_init_data when registering
leds: lm3697: cosmetic change: use helper variable, reverse christmas
tree
leds: max77650: use struct led_init_data when registering
leds: max77650: use reverse christmas tree
leds: mt6323: use struct led_init_data when registering
leds: mt6323: cosmetic change: use helper variable
leds: pm8058: use struct led_init_data when registering
leds: pm8058: cosmetic change: use helper variable
leds: pm8058: cosmetic change: no need to return in if guard
leds: pm8058: cosmetic: use reverse christmas tree
leds: is31fl32xx: use struct led_init_data when registering
leds: is31fl319x: compute aggregated max current separately
leds: is31fl319x: don't store shutdown gpio descriptor
leds: is31fl319x: don't store audio gain value, simply set it
leds: is31fl319x: refactor to register LEDs while parsing DT
leds: is31fl319x: cosmetic: use reverse christmas tree
leds: is31fl319x: use struct led_init_data when registering
leds: lm36274: use devres LED registering function
leds: lm36274: cosmetic: rename lm36274_data to chip
leds: lm36274: don't iterate through children since there is only one
leds: lm36274: use struct led_init_data when registering
leds: lm36274: do not set chip settings in DT parsing function
leds: ns2: use devres LED registering function
leds: ns2: alloc simple array instead of struct ns2_led_priv
leds: ns2: support OF probing only, forget platdata
leds: ns2: move parsing of one LED into separate function
leds: ns2: use devres API for getting GPIO descriptors
leds: ns2: cosmetic structure rename
leds: ns2: cosmetic variable rename
leds: ns2: cosmetic change
leds: ns2: cosmetic change: use helper variable
leds: ns2: register LED immediately after parsing DT properties
leds: ns2: remove unneeded variable
leds: ns2: cosmetic: use reverse christmas tree
leds: ns2: reorder headers alphabetically
leds: ns2: use struct led_init_data when registering
leds: parse linux,default-trigger DT property in LED core

drivers/leds/Kconfig | 14 +-
drivers/leds/led-class.c | 5 +
drivers/leds/leds-88pm860x.c | 6 +-
drivers/leds/leds-aat1290.c | 4 +-
drivers/leds/leds-an30259a.c | 7 +-
drivers/leds/leds-as3645a.c | 2 +-
drivers/leds/leds-aw2013.c | 11 +-
drivers/leds/leds-bcm6328.c | 28 ++-
drivers/leds/leds-bcm6358.c | 20 +-
drivers/leds/leds-cpcap.c | 9 +-
drivers/leds/leds-cr0014114.c | 5 +-
drivers/leds/leds-el15203000.c | 5 +-
drivers/leds/leds-fsg.c | 6 +
drivers/leds/leds-gpio.c | 5 +-
drivers/leds/leds-ip30.c | 1 +
drivers/leds/leds-is31fl319x.c | 260 +++++++++++-----------
drivers/leds/leds-is31fl32xx.c | 35 ++-
drivers/leds/leds-ktd2692.c | 6 +-
drivers/leds/leds-lm3532.c | 5 +-
drivers/leds/leds-lm3601x.c | 2 +-
drivers/leds/leds-lm36274.c | 122 +++++------
drivers/leds/leds-lm3692x.c | 5 +-
drivers/leds/leds-lm3697.c | 96 ++++----
drivers/leds/leds-lp50xx.c | 2 +-
drivers/leds/leds-lp5521.c | 2 +-
drivers/leds/leds-lp5523.c | 2 +-
drivers/leds/leds-lp5562.c | 2 +-
drivers/leds/leds-lp55xx-common.c | 14 +-
drivers/leds/leds-lp8501.c | 2 +-
drivers/leds/leds-lp8860.c | 8 +-
drivers/leds/leds-lt3593.c | 6 +-
drivers/leds/leds-max77650.c | 28 +--
drivers/leds/leds-max77693.c | 4 +-
drivers/leds/leds-mc13783.c | 8 +-
drivers/leds/leds-mt6323.c | 22 +-
drivers/leds/leds-netxbig.c | 8 +-
drivers/leds/leds-ns2.c | 349 ++++++++++--------------------
drivers/leds/leds-pca9532.c | 4 +-
drivers/leds/leds-pca955x.c | 2 +-
drivers/leds/leds-pca963x.c | 2 +-
drivers/leds/leds-pm8058.c | 43 ++--
drivers/leds/leds-powernv.c | 4 +-
drivers/leds/leds-pwm.c | 2 +-
drivers/leds/leds-sc27xx-bltc.c | 8 +-
drivers/leds/leds-sgm3140.c | 2 +-
drivers/leds/leds-spi-byte.c | 13 +-
drivers/leds/leds-syscon.c | 6 +-
drivers/leds/leds-tca6507.c | 8 +-
drivers/leds/leds-tlc591xx.c | 16 +-
drivers/leds/leds-turris-omnia.c | 10 +-
50 files changed, 511 insertions(+), 725 deletions(-)

--
2.26.2