public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "andriy.shevchenko@linux.intel.com" <andriy.shevchenko@linux.intel.com>
To: Jonathan Brophy <J.Brophy@corkillsystems.co.nz>
Cc: "lee@kernel.org" <lee@kernel.org>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	Pavel Machek <pavel@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/1] leds: Unexport of_led_get()
Date: Thu, 11 Dec 2025 15:51:19 +0200	[thread overview]
Message-ID: <aTrMV22s-c3GBgU2@smile.fi.intel.com> (raw)
In-Reply-To: <SYAPR01MB2863A415594BCC2FCAD80876B2A1A@SYAPR01MB2863.ausprd01.prod.outlook.com>

On Thu, Dec 11, 2025 at 12:49:12AM +0000, Jonathan Brophy wrote:
> > Still it's unclear to me what it means and how the code look like.
> > Perhaps you need to send some patches for the discussion (maybe as RFC if
> > you think they are not upstream ready).

Note, your email user agent is broken or misconfigured, it moves all lines to
be unwrapped. Please, configure it or change to one that works better with
the Linux related mailing lists.

> yes, I think  I will have to do this. 
> I'm developing a virtual LED grouping driver that needs to reference existing
> LEDs via Device Tree phandles.
> I plan it to expose the group as a singular or multicolor led.
> 
> as below I need to resolve the phandles of led_system_red and led_system_blue
> but there does not seem to be a way to do it under 
> The current api's:
> 
> DTS
> 	virtual_led_set: virtual-monocromatic-leds {
> 		compatible = "leds-group-virtualcolor";
> 
> 		led_virtual_violet: virtual-violet {
> 			color = <LED_COLOR_ID_VIOLET>;
> 			function = LED_FUNCTION_STATUS;
> 			leds = <&led_system_red>, <&led_system_blue>;

> 		};

Not an expert here, but sounds like an aggregator approach (gpio-aggregator)
design of which can be considered.

> > You can introduce it as a precursor to your driver. But OF centric variant
> > gone for good, we use fwnode in a new code.
> 
> I think this may be the only way forward.
> Removal of this function makes the virtual led driver under the current api
> impossible.
> I have my driver working with a of bridge following V4L2 fwnode helpers.
> v4l2_fwnode_endpoint_parse() and v4l2_fwnode_parse_link() has OF bridges
> where only DT bindings exist.
> Drivers walk endpoints via struct fwnode_handle, then call helpers that
> internally translate to OF nodes when needed.
> I have followed the same architecture on my driver on an older kernel
> successfully.
> 
> I was thinking a simple replacement for the of_led_get() with a patch
> something like below but I need to formalise and test further:

At glance something like this (of course the proposed code needs some
polishing).

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-12-11 13:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-10 10:43 [PATCH v1 1/1] leds: Unexport of_led_get() Jonathan Brophy
2025-12-10 12:33 ` andriy.shevchenko
2025-12-10 18:30   ` Jonathan Brophy
2025-12-10 21:54     ` andriy.shevchenko
2025-12-11  0:49       ` Jonathan Brophy
2025-12-11 13:51         ` andriy.shevchenko [this message]
2025-12-11 12:34       ` Alexander Dahl
2025-12-11 13:46         ` andriy.shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2025-06-30  9:26 Andy Shevchenko

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=aTrMV22s-c3GBgU2@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=J.Brophy@corkillsystems.co.nz \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@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