Subject: Re: [PATCH 0/3] Control ethernet PHY LEDs via LED subsystem

From: Andrew Lunn <[email-masked]>
Date: Thu, 24 Mar 2016 19:50:05 +0100

> Hi Andrew,
> 
> I still have some questions. Will the phylib call this
> led_trigger_register_to_led() function for registering the trigger
> instead of calling led_trigger_register()?

Each phy driver needs to call led_classdev_register() for each LED it
has. It then also calls led_trigger_register_to_led() with the
triggers that each LED supports.

> > function which registers a trigger to a specific LED, on its own
> > trigger list. led_trigger_store() and led_trigger_show() would use
> > both lists.
> 
> In case of led_trigger_store(), how to stop the non-PHY LEDs to
> register themselves from eth-phy-activity trigger.

They won't have the option. led_trigger_register_to_led() only
registers the trigger to one specific LED, i.e. adds it to the trigger
list in its led_classdev structure, not the global list of triggers.

     Andrew