All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andriy Shevencho <andriy.shevchenko@linux.intel.com>
To: Jonathan Brophy <Professor_jonny@hotmail.com>
Cc: Jonathan Brophy <professorjonny98@gmail.com>,
	lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Radoslav Tsvetkov <rtsvetkov@gradotech.eu>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>
Subject: Re: [RFC PATCH 1/2] leds: core: Add support for led-instance property
Date: Sun, 28 Dec 2025 21:56:33 +0200	[thread overview]
Message-ID: <aVGLcXjtJX4j8Kf5@smile.fi.intel.com> (raw)
In-Reply-To: <DS0PR84MB374654D9715FE2FAAC4C299D9FBEA@DS0PR84MB3746.NAMPRD84.PROD.OUTLOOK.COM>

On Sun, Dec 28, 2025 at 06:43:18PM +0000, Jonathan Brophy wrote:
> >But this will be called unconditionally even if the
> 
> >function/function-enumerator is present. Wouldn't these be conflicting options?
> >
> Good point! You're right that function-enumerator and led-instance could
> conflict. I'll make them mutually exclusive.
> 
> The semantic difference is:
> - function-enumerator: Numeric instances (0, 1, 2...) ^[$B"*^[(B "lan:green-5"
> - led-instance: Semantic instances ("port23") ^[$B"*^[(B "lan:green:port23"
> 
> Having both would create "lan:green-5:port23" which is confusing.
> 
> I can add validation to reject DT nodes that specify both:
> 
>   if (props->func_enum_present && instance) {
>       dev_err(dev, "'led-instance' and 'function-enumerator' are mutually exclusive\n");
>       return -EINVAL;
>   }

Dunno. Maybe Lee can comment and/or suggest on this...

> And document this in the DT binding:
> 
>   "This property cannot be used together with function-enumerator.
>    Use function-enumerator for numeric instances (0, 1, 2) or
>    led-instance for semantic instances (port0, battery, usb)."
> 
> would this be ok ?

In DT as far as I know the special syntax is used for the mutually exclusive
properties. But not an expert, better to wait the answer by DT people.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-12-28 19:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-28 18:22 [RFC PATCH 0/2] leds: Add optional instance identifier for deterministic naming Jonathan Brophy
2025-12-28 18:22 ` [RFC PATCH 1/2] leds: core: Add support for led-instance property Jonathan Brophy
2025-12-28 18:35   ` Andriy Shevencho
2025-12-28 18:43     ` Jonathan Brophy
2025-12-28 19:56       ` Andriy Shevencho [this message]
2025-12-28 18:22 ` [RFC PATCH 2/2] dt-bindings: leds: common: Add " Jonathan Brophy
2025-12-30 18:28   ` Rob Herring (Arm)
2026-01-02 10:12   ` Krzysztof Kozlowski
2025-12-28 18:31 ` [RFC PATCH 0/2] leds: Add optional instance identifier for deterministic naming Andriy Shevencho
2025-12-28 19:14   ` Jonathan Brophy
2025-12-28 19:59     ` Andriy Shevencho
2025-12-28 20:03     ` Andriy Shevencho
2025-12-29 11:16 ` Jacek Anaszewski
2025-12-29 12:30   ` Andriy Shevencho
2025-12-29 14:28     ` Jacek Anaszewski
2025-12-29 14:45       ` Andriy Shevencho
2025-12-29 23:59       ` Jonathan Brophy
2025-12-30 16:35         ` Jacek Anaszewski

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=aVGLcXjtJX4j8Kf5@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Professor_jonny@hotmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=professorjonny98@gmail.com \
    --cc=robh@kernel.org \
    --cc=rtsvetkov@gradotech.eu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.