From: Daniel Thompson <daniel@riscstar.com>
To: "Sverdlin, Alexander" <alexander.sverdlin@siemens.com>
Cc: "linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
"afd@ti.com" <afd@ti.com>,
"jingoohan1@gmail.com" <jingoohan1@gmail.com>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
"pavel@kernel.org" <pavel@kernel.org>,
"lee@kernel.org" <lee@kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"robh@kernel.org" <robh@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"danielt@kernel.org" <danielt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"deller@gmx.de" <deller@gmx.de>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 3/3] backlight: lp8864: Convert from LED to backlight class driver
Date: Tue, 23 Jun 2026 12:41:11 +0100 [thread overview]
Message-ID: <ajpw1w150SXm8Gbi@aspen.lan> (raw)
In-Reply-To: <acb13aca040ab72b9e53abee3a5c8733ebc5b8dd.camel@siemens.com>
On Tue, Jun 16, 2026 at 07:17:23AM +0000, Sverdlin, Alexander wrote:
> Hi Andrew!
>
> On Mon, 2026-06-15 at 14:51 -0500, Andrew Davis wrote:
> > > Move the TI LP8864/LP8866 driver from drivers/leds/ to
> > > drivers/video/backlight/
> >
> > Why move it? You can register a backlight device from any directory.
>
> I'm personally fine with the driver residing in drivers/leds, it's
> just that currently there are no combined drivers there, the combined
> drivers providing both interfaces only live in video/backlight.
>
> But if it's OK from the maintainers' perspective, it will be even
> more consistent regarding Kconfig symbol.
>
> > > and convert it to register a backlight class
> > > device as its primary interface.
> > >
> >
> > What do you mean by "primary"? You should be able to register with
> > both frameworks and have the driver interop between as needed.
>
> Well, I only meant the user's (or my own) perspective, sorry for confusion.
>
> > > The motivation is a use case on a hot-pluggable segment of an I2C bus.
> > > The generic led-backlight driver (drivers/video/backlight/led_bl.c) is a
> > > platform driver and as such inherently non-hotpluggable.
> >
> > That isn't strictly true, there is platform_device_{del,unregister}(), so
> > whatever your mechanism for removing the I2C device would be, the same
> > could be done to the led_bl device before then removing the I2C device.
>
> led_bl is not really designed to act on dynamically instantiated devices,
> it's very much device-tree affine (of_count_phandle_with_args(), etc...)
>
> > We don't want to have to move every LED driver that could possibly
> > be used as a backlight to the backlight framework, the led_bl.c
> > handles adapting LED->backlight as needed. So what you really need
> > here is to de-couple led_bl.c from DT so it can better handle dynamic
> > add/remove. Then this LED driver simply could register a "led-backlight"
> > platform driver to handle the backlight interface, and remove the
> > backlight device when it itself (the LED device) is removed.
>
> The mechanism we have regarding hot plugging currently is just I2C bridge,
> which de-registers and registers the bridged bus. So no additional drivers
> are required, as long as I2C devices are self-contained and not glued with
> platform devices.
>
> So bottom line is, I'd prefer to just add the backlight interface to the
> existing driver, no matter where it would live in the future.
Is there any reasion that LP8864/LP8866 is unique in appearing on a
hotplugged I2C bus? In other words if support for dynamism is added
specifically to leds-lp8864.c rather than in led_bl.c then what will stop
the same dynamic tricks from being adde to other LED drivers?
Daniel.
next prev parent reply other threads:[~2026-06-23 11:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 12:03 [PATCH 0/3] Convert LP8864 LED driver to backlight class A. Sverdlin
2026-06-15 12:03 ` [PATCH 1/3] dt-bindings: backlight: ti,lp8864: Add backlight class properties A. Sverdlin
2026-06-15 12:03 ` [PATCH 2/3] leds: lp8864: Rename struct lp8864_led and local variables A. Sverdlin
2026-06-15 12:03 ` [PATCH 3/3] backlight: lp8864: Convert from LED to backlight class driver A. Sverdlin
2026-06-15 12:16 ` sashiko-bot
2026-06-15 19:51 ` Andrew Davis
2026-06-16 7:17 ` Sverdlin, Alexander
2026-06-23 11:41 ` Daniel Thompson [this message]
2026-06-23 11:59 ` Sverdlin, Alexander
2026-06-23 13:17 ` Daniel Thompson
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=ajpw1w150SXm8Gbi@aspen.lan \
--to=daniel@riscstar.com \
--cc=afd@ti.com \
--cc=alexander.sverdlin@siemens.com \
--cc=conor+dt@kernel.org \
--cc=danielt@kernel.org \
--cc=deller@gmx.de \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=robh@kernel.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