From: Maxime Ripard <maxime@cerno.tech>
To: Samuel Holland <samuel@sholland.org>
Cc: Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Icenowy Zheng <icenowy@aosc.io>,
devicetree@vger.kernel.org, linux-leds@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] leds: sunxi: New driver for the R329/D1 LED controller
Date: Thu, 9 Sep 2021 13:36:28 +0200 [thread overview]
Message-ID: <20210909113628.ojbtbao7jlb6ophy@gilmour> (raw)
In-Reply-To: <70c76fe4-41e4-7232-c961-785193a68859@sholland.org>
Hi,
On Sun, Sep 05, 2021 at 11:17:19PM -0500, Samuel Holland wrote:
> Hi,
>
> On 9/3/21 5:36 AM, Maxime Ripard wrote:
> > On Thu, Sep 02, 2021 at 06:42:28PM -0500, Samuel Holland wrote:
> >> Some Allwinner sunxi SoCs, starting with the R329, contain an LED
> >> controller designed to drive RGB LED pixels. Add a driver for it using
> >> the multicolor LED framework, and with LEDs defined in the device tree.
> >>
> >> Signed-off-by: Samuel Holland <samuel@sholland.org>
> >> ---
> >> drivers/leds/Kconfig | 8 +
> >> drivers/leds/Makefile | 1 +
> >> drivers/leds/leds-sunxi.c | 562 ++++++++++++++++++++++++++++++++++++++
> >> 3 files changed, 571 insertions(+)
> >> create mode 100644 drivers/leds/leds-sunxi.c
> >>
> >> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> >> index ed800f5da7d8..559d2ca0a7f4 100644
> >> --- a/drivers/leds/Kconfig
> >> +++ b/drivers/leds/Kconfig
> >> @@ -297,6 +297,14 @@ config LEDS_SUNFIRE
> >> This option enables support for the Left, Middle, and Right
> >> LEDs on the I/O and CPU boards of SunFire UltraSPARC servers.
> >>
> >> +config LEDS_SUNXI
> >> + tristate "LED support for Allwinner sunxi LED controller"
> >> + depends on LEDS_CLASS
> >> + depends on ARCH_SUNXI || COMPILE_TEST
> >> + help
> >> + This option enables support for the LED controller provided in
> >> + some Allwinner sunxi SoCs.
> >> +
> >
> > Same comment for the name
>
> Are you concerned about the help text only, or do you also want me to rename the
> Kconfig symbol?
The driver, the driver symbols and the Kconfig symbol would be nice
> I am happy to change the help text to something like: "This option enables
> support for the LED controller provided in the Allwinner R329 and D1 SoCs."
>
> But I don't know of any satisfying way to rename the Kconfig symbol. There is no
> general category name for "R329 and D1."
Yeah, this is not ideal, but the issue is that nothing is telling us
whether or not it will support *only* the R329 and D1. Chances are it's
going to be featured in a number of other SoCs in the future, so if we
were to have the entire list of supported SoCs in the Kconfig symbol and
driver name, we'd have to always change them everytime a new SoC support
is introduced.
It would be a pain, and it's pretty much guaranteed that someone is
going to forget at some point. To mitigate this, we took the approach to
use the same semantic than the DT compatible: the driver name doesn't
really define the list of all the SoCs supported but matches every SoC
(more or less) compatible with that SoC.
If you want to have the entire list in the Kconfig help though, I don't
see anything wrong with that. Even if it goes unmaintained, it wouldn't
really be a big deal.
Maxime
next prev parent reply other threads:[~2021-09-09 11:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 23:42 [PATCH 1/2] dt-bindings: leds: Add Allwinner R329/D1 LED controller Samuel Holland
2021-09-02 23:42 ` [PATCH 2/2] leds: sunxi: New driver for the " Samuel Holland
2021-09-03 5:38 ` kernel test robot
2021-09-03 10:07 ` kernel test robot
2021-09-03 10:36 ` Maxime Ripard
2021-09-06 4:17 ` Samuel Holland
2021-09-09 11:36 ` Maxime Ripard [this message]
2021-09-09 13:54 ` Samuel Holland
2021-09-14 17:58 ` Maxime Ripard
2021-09-03 10:26 ` [PATCH 1/2] dt-bindings: leds: Add Allwinner " Maxime Ripard
2021-09-03 15:56 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210909113628.ojbtbao7jlb6ophy@gilmour \
--to=maxime@cerno.tech \
--cc=devicetree@vger.kernel.org \
--cc=icenowy@aosc.io \
--cc=jernej.skrabec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox