aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch
diff options
context:
space:
mode:
authorJosef Schlehofer <pepe.schlehofer@gmail.com>2022-07-26 14:32:37 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2022-08-13 20:53:10 +0200
commit049368b936988ce2c7f82c07367d168600fdbaa6 (patch)
treea61c3fe3aa07302070a5fbb647785a7210f1a24e /target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch
parent2ae26f523e9bfcd3bdfa93604afe8de9addf5a90 (diff)
downloadupstream-049368b936988ce2c7f82c07367d168600fdbaa6.tar.gz
upstream-049368b936988ce2c7f82c07367d168600fdbaa6.tar.bz2
upstream-049368b936988ce2c7f82c07367d168600fdbaa6.zip
mvebu: backport pending Turris Omnia LEDs improvements
It backports this patch series, which is currently on review: https://lore.kernel.org/linux-leds/20220704105955.15474-1-kabel@kernel.org/T/#rb89a4ca5a836f17bdcc53d65549e0b1779bb6a18 It allows being able to configure LEDs in userspace. This fixes issue described in Turris Build repository https://gitlab.nic.cz/turris/os/build/-/issues/354 It happens in OpenWrt as well. - Before ``` root@turris:/# ls /sys/class/leds/ ath10k-phy0 ath9k-phy1 mmc0:: ``` -After ``` root@turris:/# ls /sys/class/leds/ ath10k-phy0 rgb:indicator-2 rgb:lan-3 rgb:wlan-1 ath9k-phy1 rgb:lan-0 rgb:lan-4 rgb:wlan-2 mmc0:: rgb:lan-1 rgb:power rgb:wlan-3 rgb:indicator-1 rgb:lan-2 rgb:wan ``` Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Diffstat (limited to 'target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch')
-rw-r--r--target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch b/target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch
new file mode 100644
index 0000000000..6f9aaf11db
--- /dev/null
+++ b/target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch
@@ -0,0 +1,33 @@
+From bda176cceb735b9b46c1900658b6486c34e13ae6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@kernel.org>
+Date: Mon, 4 Jul 2022 12:59:54 +0200
+Subject: [PATCH] leds: turris-omnia: initialize multi-intensity to full
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The default color of each LED before driver probe (255, 255, 255).
+Initialize multi_intensity to this value, so that it corresponds to the
+reality.
+
+Signed-off-by: Marek BehĂșn <kabel@kernel.org>
+---
+ drivers/leds/leds-turris-omnia.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/leds/leds-turris-omnia.c
++++ b/drivers/leds/leds-turris-omnia.c
+@@ -139,10 +139,13 @@ static int omnia_led_register(struct i2c
+ }
+
+ led->subled_info[0].color_index = LED_COLOR_ID_RED;
++ led->subled_info[0].intensity = 255;
+ led->subled_info[0].channel = 0;
+ led->subled_info[1].color_index = LED_COLOR_ID_GREEN;
++ led->subled_info[1].intensity = 255;
+ led->subled_info[1].channel = 1;
+ led->subled_info[2].color_index = LED_COLOR_ID_BLUE;
++ led->subled_info[2].intensity = 255;
+ led->subled_info[2].channel = 2;
+
+ led->mc_cdev.subled_info = led->subled_info;