aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2023-03-01 08:52:26 +0100
committerRafał Miłecki <rafal@milecki.pl>2023-03-01 08:54:33 +0100
commitf86f8e568461681fc85caf3c972489045367030e (patch)
treeb025f6795b2f9de32e68bc346f908670783e0249 /target
parent8d995b3bd7aa1b13e7874515a8454349d240556d (diff)
downloadupstream-f86f8e568461681fc85caf3c972489045367030e.tar.gz
upstream-f86f8e568461681fc85caf3c972489045367030e.tar.bz2
upstream-f86f8e568461681fc85caf3c972489045367030e.zip
kernel: support "linux,default-trigger" in leds-bcm63138
This driver is backported from the v6.0 which deals with "linux,default-trigger" in leds core. For kernel 5.4 we need leds-bcm63138 to read trigger on its own. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/hack-5.4/800-leds-leds-bcm63138-read-default-trigger-from-OF.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/generic/hack-5.4/800-leds-leds-bcm63138-read-default-trigger-from-OF.patch b/target/linux/generic/hack-5.4/800-leds-leds-bcm63138-read-default-trigger-from-OF.patch
new file mode 100644
index 0000000000..684bb9f842
--- /dev/null
+++ b/target/linux/generic/hack-5.4/800-leds-leds-bcm63138-read-default-trigger-from-OF.patch
@@ -0,0 +1,26 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Tue, 28 Feb 2023 23:38:30 +0100
+Subject: [PATCH] leds: leds-bcm63138: read default trigger from OF
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It's needed in kernels older than 5.10 due to the missing commit
+c49d6cab0d7f ("leds: parse linux,default-trigger DT property in LED
+core").
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+---
+ drivers/leds/blink/leds-bcm63138.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/leds/blink/leds-bcm63138.c
++++ b/drivers/leds/blink/leds-bcm63138.c
+@@ -228,6 +228,7 @@ static void bcm63138_leds_create_led(str
+ led->cdev.max_brightness = BCM63138_MAX_BRIGHTNESS;
+ led->cdev.brightness_set = bcm63138_leds_brightness_set;
+ led->cdev.blink_set = bcm63138_leds_blink_set;
++ led->cdev.default_trigger = of_get_property(np, "linux,default-trigger", NULL);
+
+ err = devm_led_classdev_register_ext(dev, &led->cdev, &init_data);
+ if (err) {