[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <745e427d-819e-12d7-5c94-7a8d1a414956@gmail.com>
Date: Mon, 18 Nov 2019 22:55:08 +0100
From: Jacek Anaszewski <jacek.anaszewski@...il.com>
To: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
mazziesaccount@...il.com
Cc: Lee Jones <lee.jones@...aro.org>, Pavel Machek <pavel@....cz>,
Dan Murphy <dmurphy@...com>, Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jonathan Corbet <corbet@....net>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Nicholas Mc Guire <hofrat@...dl.org>,
Phil Edworthy <phil.edworthy@...esas.com>,
linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-clk@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-rtc@...r.kernel.org
Subject: Re: [PATCH v5 15/16] leds: Add common LED binding parsing support to
LED class/core
Hi Matti,
Thank you for the patch. If your driver does not depend
on it then please send is separately. Besides, we would require
to convert many of current LED drivers to verify how the
proposed parsing mechanism will work with them. I've been testing
my LED name composition series using QEMU and stubbing things in
drivers where necessary and I propose to use the same approach
in this case.
Best regards,
Jacek Anaszewski
On 11/18/19 8:03 AM, Matti Vaittinen wrote:
> Qucik grep for 'for_each' or 'linux,default-trigger' or
> 'default-state' under drivers/leds can tell quite a lot. It seems
> multiple LED controller drivers implement the very similar looping
> through the child nodes in order to locate the LED nodes and read
> and support the common LED dt bindings. Implementing this same
> stuff for all LED controllers gets old pretty fast.
>
> This commit adds support for locating the LED node (based on known
> node names - or linux,led-compatible property) and handling of
> few common LED properties.
>
> linux,default-trigger,
> default-state (with the exception of keep),
>
> (in addition to already handled
> function-enumerator,
> function,
> color
> and label).
>
> Regarding the node look-up: If no init_data is given, then no
> node-lookup is done and cdev name is used as such.
>
> If init_data is goven but no starting point for node lookup - then
> (parent) device's own DT node is used. If no led-compatible is given,
> then of_match is searched for. If neither led-compatible not of_match
> is given then device's own node or passed starting point are used as
> such.
>
> Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> ---
>
> Changes from v4:
> Fixed issues reported by Dan Carpenter and kbuild-bot.
> (leftover kfree and uninitialized return value)
>
> drivers/leds/led-class.c | 88 ++++++++++++--
> drivers/leds/led-core.c | 246 +++++++++++++++++++++++++++++++--------
> include/linux/leds.h | 90 ++++++++++++--
> 3 files changed, 359 insertions(+), 65 deletions(-)
>
--
Best regards,
Jacek Anaszewski
Powered by blists - more mailing lists