On 11/28/2017 01:07 PM, Pavel Machek wrote: > On Tue 2017-11-28 17:38:20, Craig McQueen wrote: >> It calls led_trigger_set_default() to set the LED to its default >> trigger. > > This needs corresponding change to documentation, at the very least. I agree - Documentation/ABI/testing/sysfs-class-led will need an update. >> drivers/leds/led-triggers.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c >> index 431123b048a2..f090a7806017 100644 >> --- a/drivers/leds/led-triggers.c >> +++ b/drivers/leds/led-triggers.c >> @@ -49,6 +49,11 @@ ssize_t led_trigger_store(struct device *dev, struct device_attribute *attr, >> goto unlock; >> } >> >> + if (sysfs_streq(buf, "default")) { >> + led_trigger_set_default(led_cdev); >> + goto unlock; >> + } >> + In an addition to that I'd extend led_trigger_show() to list also "default" among available triggers if a LED class device has its default_trigger property initialized and the trigger is registered. -- Best regards, Jacek Anaszewski