Subject: Re: [PATCH net-next 5/5] igc: Export LEDs

From: Kurt Kanzenbach <[email-masked]>
Date: Mon, 19 Jul 2021 08:06:41 +0200

Hi Andrew,

On Fri Jul 16 2021, Andrew Lunn wrote:
> On Fri, Jul 16, 2021 at 02:24:27PM -0700, Tony Nguyen wrote:
>> From: Kurt Kanzenbach <[email-masked]>
>> 
>> 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
>> $ cat brightness      # Current Mode
>> $ cat max_brightness  # 15
>> $ echo 0 > brightness # Mode 0
>> $ echo 1 > brightness # Mode 1
>> 
>> The brightness field here reflects the different LED modes ranging
>> from 0 to 15.
>
> What do you mean by mode? Do you mean blink mode? Like On means 1G
> link, and it blinks for packet TX?

There are different modes such as ON, OFF, LINK established, LINK
activity, PAUSED ... Blinking is controlled by a different register.

Are there better ways to export this?

Thanks,
Kurt