]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 20:21:23 +0000 (22:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 20:21:23 +0000 (22:21 +0200)
added patches:
gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch

queue-5.4/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch b/queue-5.4/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch
new file mode 100644 (file)
index 0000000..d358ce9
--- /dev/null
@@ -0,0 +1,41 @@
+From fc363413ef8ea842ae7a99e3caf5465dafdd3a49 Mon Sep 17 00:00:00 2001
+From: Haibo Chen <haibo.chen@nxp.com>
+Date: Wed, 18 Oct 2023 11:00:17 +0200
+Subject: gpio: vf610: set value before the direction to avoid a glitch
+
+From: Haibo Chen <haibo.chen@nxp.com>
+
+commit fc363413ef8ea842ae7a99e3caf5465dafdd3a49 upstream.
+
+We found a glitch when configuring the pad as output high. To avoid this
+glitch, move the data value setting before direction config in the
+function vf610_gpio_direction_output().
+
+Fixes: 659d8a62311f ("gpio: vf610: add imx7ulp support")
+Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
+[Bartosz: tweak the commit message]
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpio/gpio-vf610.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpio/gpio-vf610.c
++++ b/drivers/gpio/gpio-vf610.c
+@@ -127,14 +127,14 @@ static int vf610_gpio_direction_output(s
+       unsigned long mask = BIT(gpio);
+       u32 val;
++      vf610_gpio_set(chip, gpio, value);
++
+       if (port->sdata && port->sdata->have_paddr) {
+               val = vf610_gpio_readl(port->gpio_base + GPIO_PDDR);
+               val |= mask;
+               vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR);
+       }
+-      vf610_gpio_set(chip, gpio, value);
+-
+       return pinctrl_gpio_direction_output(chip->base + gpio);
+ }
index 778b7924509397ad328e2d8c0f8fb7b45a0dc0d5..d312ab0c85ced7601d772d532b5c1784cdd43399 100644 (file)
@@ -112,3 +112,4 @@ usb-serial-option-add-entry-for-sierra-em9191-with-new-firmware.patch
 usb-serial-option-add-fibocom-to-dell-custom-modem-fm101r-gl.patch
 perf-disallow-mis-matched-inherited-group-reads.patch
 s390-pci-fix-iommu-bitmap-allocation.patch
+gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch