Linux userland API discussions
 help / color / mirror / Atom feed
From: Josef Schlehofer <pepe.schlehofer@gmail.com>
To: "Marek Behún" <kabel@kernel.org>
Cc: "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>,
	"Pali Rohár" <pali@kernel.org>,
	"Andy Shevchenko" <andy@kernel.org>, "Rong Zhang" <i@rong.moe>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] leds: Add support for Turris 1.x LEDs
Date: Sat, 17 Oct 2026 21:01:44 +0200	[thread overview]
Message-ID: <D7371D8B-06B6-4F52-8B08-CC573E699EE5@gmail.com> (raw)
In-Reply-To: <arvNDgAVO4V_drW7@solitude>


Hi Marek,

> On 29. 9. 2026, at 16:45, Marek Behún <kabel@kernel.org> wrote:
> 
> My proposal is to register the first LAN LED as a true multicolor LED,
> and the rest of LAN LEDs as simple LEDs, and then create sysfs
> symlinks for the multi_intensity and multi_index attribute files:
> 
>  rgb:lan-1
>    multi_intensity   (true attribute file)
>    multi_index       (true attribute file)
>  rgb:lan-2
>    multi_intensity   (symlink to ../rgb:lan-1/multi_intensity)
>    multi_index       (symlink to ../rgb:lan-1/multi_index)
>  ...
> 
> This way the sysfs will somehow reflect this topology.
> 
> Also, the max_brigthness will need to be set to 1 instead of 255,
> since we can set each LAN LED on/off state individually, but color
> globally.

I tried to reach you privately about this. I am ready to do it, but
before I do, I would like to clarify one thing.

v4 will have rgb:lan-1 as the multicolor LED, the other four LAN LEDs
as plain LEDs, and max_brightness 1 on all five.

I am not sure about the symlinks, though. sysfs_create_link() can only
link a whole kobject. A single attribute can be linked with
compat_only_sysfs_link_entry_to_kobj(), but its callers in the tree
(tpm, fadump, img-ascii-lcd) use it to keep old sysfs paths working.
Would you and Lee be fine with it here, or do you prefer a link to the
whole rgb:lan-1 directory, or only the ABI documentation saying that
rgb:lan-1 sets the colour of all five?

Josef

  reply	other threads:[~2026-10-17 19:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 11:19 [PATCH v3 0/2] leds: Add support for CZ.NIC Turris 1.x LEDs Josef Schlehofer
2026-09-28 11:19 ` [PATCH v3 1/2] dt-bindings: leds: Add CZ.NIC Turris 1.x LED controller Josef Schlehofer
2026-10-07 21:06   ` Rob Herring (Arm)
2026-09-28 11:19 ` [PATCH v3 2/2] leds: Add support for Turris 1.x LEDs Josef Schlehofer
2026-09-28 13:07   ` Andy Shevchenko
2026-09-29 14:45   ` Marek Behún
2026-10-17 19:01     ` Josef Schlehofer [this message]
2026-09-29 15:30   ` Uwe Kleine-König

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=D7371D8B-06B6-4F52-8B08-CC573E699EE5@gmail.com \
    --to=pepe.schlehofer@gmail.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=i@rong.moe \
    --cc=kabel@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pali@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