]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
queue gpio-mxs-get-rid-of-external-api-call.patch
authorSasha Levin <sashal@kernel.org>
Tue, 6 Nov 2018 19:05:20 +0000 (14:05 -0500)
committerSasha Levin <sashal@kernel.org>
Tue, 6 Nov 2018 19:05:20 +0000 (14:05 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.14/gpio-mxs-get-rid-of-external-api-call.patch [new file with mode: 0644]
queue-4.14/series
queue-4.18/gpio-mxs-get-rid-of-external-api-call.patch [new file with mode: 0644]
queue-4.18/series
queue-4.19/gpio-mxs-get-rid-of-external-api-call.patch [new file with mode: 0644]
queue-4.19/series
queue-4.9/gpio-mxs-get-rid-of-external-api-call.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.14/gpio-mxs-get-rid-of-external-api-call.patch b/queue-4.14/gpio-mxs-get-rid-of-external-api-call.patch
new file mode 100644 (file)
index 0000000..f31bc9f
--- /dev/null
@@ -0,0 +1,50 @@
+From 95508d669f95181a0a2b9721fa845c160f61f4a7 Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij@linaro.org>
+Date: Wed, 29 Aug 2018 17:02:16 +0200
+Subject: gpio: mxs: Get rid of external API call
+
+[ Upstream commit 833eacc7b5913da9896bacd30db7d490aa777868 ]
+
+The MXS driver was calling back into the GPIO API from
+its irqchip. This is not very elegant, as we are a driver,
+let's just shortcut back into the gpio_chip .get() function
+instead.
+
+This is a tricky case since the .get() callback is not in
+this file, instead assigned by bgpio_init(). Calling the
+function direcly in the gpio_chip is however the lesser
+evil.
+
+Cc: Sascha Hauer <s.hauer@pengutronix.de>
+Cc: Janusz Uzycki <j.uzycki@elproma.com.pl>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpio/gpio-mxs.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
+index 435def22445d..f66395524d0e 100644
+--- a/drivers/gpio/gpio-mxs.c
++++ b/drivers/gpio/gpio-mxs.c
+@@ -32,8 +32,6 @@
+ #include <linux/platform_device.h>
+ #include <linux/slab.h>
+ #include <linux/gpio/driver.h>
+-/* FIXME: for gpio_get_value(), replace this by direct register read */
+-#include <linux/gpio.h>
+ #include <linux/module.h>
+ #define MXS_SET               0x4
+@@ -100,7 +98,7 @@ static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type)
+       port->both_edges &= ~pin_mask;
+       switch (type) {
+       case IRQ_TYPE_EDGE_BOTH:
+-              val = gpio_get_value(port->gc.base + d->hwirq);
++              val = port->gc.get(&port->gc, d->hwirq);
+               if (val)
+                       edge = GPIO_INT_FALL_EDGE;
+               else
+-- 
+2.17.1
+
index be22bb8015eab13f4ab3a902d52f61289364c7d3..ab18cead581ec05b56bb9c8d399113d755feb229 100644 (file)
@@ -6,3 +6,4 @@ bpf-fix-partial-copy-of-map_ptr-when-dst-is-scalar.patch
 revert-arm-tegra-fix-ulpi-regression-on-tegra20.patch
 clk-tegra-add-quirk-for-getting-cdev1-2-clocks-on-te.patch
 fsnotify-fix-ignore-mask-logic-in-fsnotify.patch
+gpio-mxs-get-rid-of-external-api-call.patch
diff --git a/queue-4.18/gpio-mxs-get-rid-of-external-api-call.patch b/queue-4.18/gpio-mxs-get-rid-of-external-api-call.patch
new file mode 100644 (file)
index 0000000..d1e5130
--- /dev/null
@@ -0,0 +1,50 @@
+From 2a045977da9bf34c7525af8b05b4deaa5e26ea99 Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij@linaro.org>
+Date: Wed, 29 Aug 2018 17:02:16 +0200
+Subject: gpio: mxs: Get rid of external API call
+
+[ Upstream commit 833eacc7b5913da9896bacd30db7d490aa777868 ]
+
+The MXS driver was calling back into the GPIO API from
+its irqchip. This is not very elegant, as we are a driver,
+let's just shortcut back into the gpio_chip .get() function
+instead.
+
+This is a tricky case since the .get() callback is not in
+this file, instead assigned by bgpio_init(). Calling the
+function direcly in the gpio_chip is however the lesser
+evil.
+
+Cc: Sascha Hauer <s.hauer@pengutronix.de>
+Cc: Janusz Uzycki <j.uzycki@elproma.com.pl>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpio/gpio-mxs.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
+index e2831ee70cdc..deb539b3316b 100644
+--- a/drivers/gpio/gpio-mxs.c
++++ b/drivers/gpio/gpio-mxs.c
+@@ -18,8 +18,6 @@
+ #include <linux/platform_device.h>
+ #include <linux/slab.h>
+ #include <linux/gpio/driver.h>
+-/* FIXME: for gpio_get_value(), replace this by direct register read */
+-#include <linux/gpio.h>
+ #include <linux/module.h>
+ #define MXS_SET               0x4
+@@ -86,7 +84,7 @@ static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type)
+       port->both_edges &= ~pin_mask;
+       switch (type) {
+       case IRQ_TYPE_EDGE_BOTH:
+-              val = gpio_get_value(port->gc.base + d->hwirq);
++              val = port->gc.get(&port->gc, d->hwirq);
+               if (val)
+                       edge = GPIO_INT_FALL_EDGE;
+               else
+-- 
+2.17.1
+
index 2cb359839c246ec7907295b5986212e68eef3f3e..d98d059f3b786ca347228c68338571f75367e900 100644 (file)
@@ -1,3 +1,4 @@
 eeprom-at24-add-support-for-address-width-property.patch
 vfs-swap-names-of-do-vfs-_clone_file_range.patch
 bpf-fix-partial-copy-of-map_ptr-when-dst-is-scalar.patch
+gpio-mxs-get-rid-of-external-api-call.patch
diff --git a/queue-4.19/gpio-mxs-get-rid-of-external-api-call.patch b/queue-4.19/gpio-mxs-get-rid-of-external-api-call.patch
new file mode 100644 (file)
index 0000000..a447b32
--- /dev/null
@@ -0,0 +1,50 @@
+From cb26b945146bed7b70de02abd9ea74433fd8afe5 Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij@linaro.org>
+Date: Wed, 29 Aug 2018 17:02:16 +0200
+Subject: gpio: mxs: Get rid of external API call
+
+[ Upstream commit 833eacc7b5913da9896bacd30db7d490aa777868 ]
+
+The MXS driver was calling back into the GPIO API from
+its irqchip. This is not very elegant, as we are a driver,
+let's just shortcut back into the gpio_chip .get() function
+instead.
+
+This is a tricky case since the .get() callback is not in
+this file, instead assigned by bgpio_init(). Calling the
+function direcly in the gpio_chip is however the lesser
+evil.
+
+Cc: Sascha Hauer <s.hauer@pengutronix.de>
+Cc: Janusz Uzycki <j.uzycki@elproma.com.pl>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpio/gpio-mxs.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
+index df30490da820..ea874fd033a5 100644
+--- a/drivers/gpio/gpio-mxs.c
++++ b/drivers/gpio/gpio-mxs.c
+@@ -18,8 +18,6 @@
+ #include <linux/platform_device.h>
+ #include <linux/slab.h>
+ #include <linux/gpio/driver.h>
+-/* FIXME: for gpio_get_value(), replace this by direct register read */
+-#include <linux/gpio.h>
+ #include <linux/module.h>
+ #define MXS_SET               0x4
+@@ -86,7 +84,7 @@ static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type)
+       port->both_edges &= ~pin_mask;
+       switch (type) {
+       case IRQ_TYPE_EDGE_BOTH:
+-              val = gpio_get_value(port->gc.base + d->hwirq);
++              val = port->gc.get(&port->gc, d->hwirq);
+               if (val)
+                       edge = GPIO_INT_FALL_EDGE;
+               else
+-- 
+2.17.1
+
index 71d208ab114d421d4ae9376d0e1089125ebb0ce4..ddb4ef54c1bf5c4fcbc699432aa621d2c2a74751 100644 (file)
@@ -1,2 +1,3 @@
 bpf-fix-partial-copy-of-map_ptr-when-dst-is-scalar.patch
 mips-vdso-reduce-vdso_randomize_size-to-64mb-for-64b.patch
+gpio-mxs-get-rid-of-external-api-call.patch
diff --git a/queue-4.9/gpio-mxs-get-rid-of-external-api-call.patch b/queue-4.9/gpio-mxs-get-rid-of-external-api-call.patch
new file mode 100644 (file)
index 0000000..5914b7e
--- /dev/null
@@ -0,0 +1,50 @@
+From ba410a7089ef9c87c6f315de33fc92bc16c50e54 Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij@linaro.org>
+Date: Wed, 29 Aug 2018 17:02:16 +0200
+Subject: gpio: mxs: Get rid of external API call
+
+[ Upstream commit 833eacc7b5913da9896bacd30db7d490aa777868 ]
+
+The MXS driver was calling back into the GPIO API from
+its irqchip. This is not very elegant, as we are a driver,
+let's just shortcut back into the gpio_chip .get() function
+instead.
+
+This is a tricky case since the .get() callback is not in
+this file, instead assigned by bgpio_init(). Calling the
+function direcly in the gpio_chip is however the lesser
+evil.
+
+Cc: Sascha Hauer <s.hauer@pengutronix.de>
+Cc: Janusz Uzycki <j.uzycki@elproma.com.pl>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpio/gpio-mxs.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
+index ee1724806f46..ab8dcfea0680 100644
+--- a/drivers/gpio/gpio-mxs.c
++++ b/drivers/gpio/gpio-mxs.c
+@@ -32,8 +32,6 @@
+ #include <linux/platform_device.h>
+ #include <linux/slab.h>
+ #include <linux/gpio/driver.h>
+-/* FIXME: for gpio_get_value(), replace this by direct register read */
+-#include <linux/gpio.h>
+ #include <linux/module.h>
+ #define MXS_SET               0x4
+@@ -94,7 +92,7 @@ static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type)
+       port->both_edges &= ~pin_mask;
+       switch (type) {
+       case IRQ_TYPE_EDGE_BOTH:
+-              val = gpio_get_value(port->gc.base + d->hwirq);
++              val = port->gc.get(&port->gc, d->hwirq);
+               if (val)
+                       edge = GPIO_INT_FALL_EDGE;
+               else
+-- 
+2.17.1
+
index f55613ed4d5374ecfff998829259a6c8a24e3a17..3241ecdc4d6005c4dd65609e04194d5a3cfc2bea 100644 (file)
@@ -153,3 +153,4 @@ ip6_tunnel-fix-encapsulation-layout.patch
 revert-x86-mm-expand-static-page-table-for-fixmap-sp.patch
 crypto-shash-fix-a-sleep-in-atomic-bug-in-shash_setk.patch
 ahci-don-t-ignore-result-code-of-ahci_reset_controll.patch
+gpio-mxs-get-rid-of-external-api-call.patch