From 10f8823254a6bf96a09a00a73e138a0da226040f Mon Sep 17 00:00:00 2001 From: Johann Neuhauser Date: Mon, 11 Jun 2018 21:15:40 +0200 Subject: [PATCH] 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 --- .../0003-leds-add-reset-controller-based-driver.patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)