[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f705bcd6-c55c-0b07-612f-38348d85bbee@gmail.com>
Date: Mon, 19 Jul 2021 00:19:17 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>, davem@...emloft.net,
kuba@...nel.org
Cc: Kurt Kanzenbach <kurt@...utronix.de>, netdev@...r.kernel.org,
sasha.neftin@...el.com, vitaly.lifshits@...el.com,
vinicius.gomes@...el.com,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Dvora Fuxbrumer <dvorax.fuxbrumer@...ux.intel.com>
Subject: Re: [PATCH net-next 5/5] igc: Export LEDs
On 16.07.2021 23:24, Tony Nguyen wrote:
> From: Kurt Kanzenbach <kurt@...utronix.de>
>
> Each i225 has three LEDs. Export them via the LED class framework.
>
> Each LED is controllable via sysfs. Example:
>
> $ cd /sys/class/leds/igc_led0
What if you have multiple igc adapters in a system?
AFAIK the LED subsystem assigns a unique name, but it's
out of your control and most likely not what you want.
Better would be to use the interface name. However then
a challenge is how to deal with interface renaming.
> $ cat brightness # Current Mode
> $ cat max_brightness # 15
> $ echo 0 > brightness # Mode 0
> $ echo 1 > brightness # Mode 1
>
In general I'm not sure using the LED API provides a benefit here.
The brightness attribute is simply misused. Maybe better add
a sysfs attribute like led_mode under the netdev sysfs entry?
Then you also don't have the issue with interface renaming.
Powered by blists - more mailing lists