From: Greg Kroah-Hartman Date: Sat, 21 Oct 2023 20:21:14 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.14.328~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=be0cb20e02301ab4eb3dd973ddd175324a4fd4bc;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch --- diff --git a/queue-4.19/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch b/queue-4.19/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch new file mode 100644 index 00000000000..23bc6ee86b5 --- /dev/null +++ b/queue-4.19/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch @@ -0,0 +1,41 @@ +From fc363413ef8ea842ae7a99e3caf5465dafdd3a49 Mon Sep 17 00:00:00 2001 +From: Haibo Chen +Date: Wed, 18 Oct 2023 11:00:17 +0200 +Subject: gpio: vf610: set value before the direction to avoid a glitch + +From: Haibo Chen + +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 +[Bartosz: tweak the commit message] +Signed-off-by: Bartosz Golaszewski +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -137,14 +137,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); + } + diff --git a/queue-4.19/series b/queue-4.19/series index d4b4727513a..5582f150dc3 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -94,3 +94,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