From: Johann Neuhauser Date: Mon, 11 Jun 2018 19:15:40 +0000 (+0200) Subject: ath79: led-resets: add default-trigger property X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=10f8823254a6bf96a09a00a73e138a0da226040f;p=openwrt%2Fstaging%2Fjogo.git ath79: led-resets: add default-trigger property Add support for the common led property "linux,default-trigger". It allows to set a default led trigger via devicetree. Signed-off-by: Johann Neuhauser [add commit message] Signed-off-by: Mathias Kresin --- diff --git a/target/linux/ath79/patches-4.14/0003-leds-add-reset-controller-based-driver.patch b/target/linux/ath79/patches-4.14/0003-leds-add-reset-controller-based-driver.patch index 495d79288b..d15c77a8dd 100644 --- a/target/linux/ath79/patches-4.14/0003-leds-add-reset-controller-based-driver.patch +++ b/target/linux/ath79/patches-4.14/0003-leds-add-reset-controller-based-driver.patch @@ -33,7 +33,7 @@ Signed-off-by: John Crispin --- /dev/null +++ b/drivers/leds/leds-reset.c -@@ -0,0 +1,137 @@ +@@ -0,0 +1,140 @@ +/* + * Copyright (C) 2018 John Crispin + * @@ -112,6 +112,9 @@ Signed-off-by: John Crispin + if (IS_ERR(led->rst)) + return ERR_PTR(-EINVAL); + ++ fwnode_property_read_string(child, "linux,default-trigger", ++ &led->cdev.default_trigger); ++ + led->cdev.brightness_set = reset_led_set; + ret = devm_of_led_classdev_register(&pdev->dev, np, &led->cdev); + if (ret < 0)