[openwrt/openwrt] kernel: 5.10: backport fix for lp55xx LED driver

LEDE Commits lede-commits at lists.infradead.org
Sat Sep 25 10:29:27 PDT 2021


adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3c3b84fd87a604afecb159b7ecd614bfe88eb675

commit 3c3b84fd87a604afecb159b7ecd614bfe88eb675
Author: Robert Marko <robert.marko at sartura.hr>
AuthorDate: Fri Sep 17 12:27:44 2021 +0200

    kernel: 5.10: backport fix for lp55xx LED driver
    
    This backports the upstream commit:
    leds: lp55xx: Initialize enable GPIO direction to output
    
    Without it under kernel 5.10 on Asus MAP-AC2200
    the LED driver will fail probing:
    [    1.947521] lp5523x: probe of 0-0032 failed with error -22
    
    After the backported fix:
    [    1.873236] lp5523x 0-0032: lp5523 Programmable led chip found
    
    Signed-off-by: Robert Marko <robert.marko at sartura.hr>
    Tested-by: Szabolcs Hubai <szab.hu at gmail.com> [ipq4029/gl-b1300]
    Tested-by: Nick Hainke <vincent at systemli.org> [ipq4019/fritzbox-7530
                                                   ipq4019/fritzbox-4040
                                                   ipq4019/sxtsq-5ac]
    Tested-by: Stefan Lippers-Hollmann <s.l-h at gmx.de> [ipq4019/map-ac2200]
---
 ...-Initialize-enable-GPIO-direction-to-outp.patch | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/target/linux/generic/backport-5.10/830-v5.14-leds-lp55xx-Initialize-enable-GPIO-direction-to-outp.patch b/target/linux/generic/backport-5.10/830-v5.14-leds-lp55xx-Initialize-enable-GPIO-direction-to-outp.patch
new file mode 100644
index 0000000000..75b9947392
--- /dev/null
+++ b/target/linux/generic/backport-5.10/830-v5.14-leds-lp55xx-Initialize-enable-GPIO-direction-to-outp.patch
@@ -0,0 +1,28 @@
+From a5d3d1adc95f4ac5968b7a77ee95a3abbbb96f49 Mon Sep 17 00:00:00 2001
+From: Doug Zobel <dougdev334 at gmail.com>
+Date: Mon, 10 May 2021 15:40:00 -0500
+Subject: [PATCH] leds: lp55xx: Initialize enable GPIO direction to output
+
+The "Convert to use GPIO descriptors" commit changed the
+initialization of the enable GPIO from GPIOF_DIR_OUT to
+GPIOD_ASIS.  This breaks systems where the GPIO does not
+default to output.  Changing the enable initialization
+to GPIOD_OUT_LOW.
+
+Signed-off-by: Doug Zobel <dougdev334 at gmail.com>
+Signed-off-by: Pavel Machek <pavel at ucw.cz>
+---
+ drivers/leds/leds-lp55xx-common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/leds/leds-lp55xx-common.c
++++ b/drivers/leds/leds-lp55xx-common.c
+@@ -694,7 +694,7 @@ struct lp55xx_platform_data *lp55xx_of_p
+ 	of_property_read_u8(np, "clock-mode", &pdata->clock_mode);
+ 
+ 	pdata->enable_gpiod = devm_gpiod_get_optional(dev, "enable",
+-						      GPIOD_ASIS);
++						      GPIOD_OUT_LOW);
+ 	if (IS_ERR(pdata->enable_gpiod))
+ 		return ERR_CAST(pdata->enable_gpiod);
+ 



More information about the lede-commits mailing list