From: Sasha Levin Date: Tue, 6 Nov 2018 19:05:20 +0000 (-0500) Subject: queue gpio-mxs-get-rid-of-external-api-call.patch X-Git-Tag: v3.18.125~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=576628ef09a0708f7e2eed18791f05764a402089;p=thirdparty%2Fkernel%2Fstable-queue.git queue gpio-mxs-get-rid-of-external-api-call.patch Signed-off-by: Sasha Levin --- 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 index 00000000000..f31bc9fd885 --- /dev/null +++ b/queue-4.14/gpio-mxs-get-rid-of-external-api-call.patch @@ -0,0 +1,50 @@ +From 95508d669f95181a0a2b9721fa845c160f61f4a7 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +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 +Cc: Janusz Uzycki +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + 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 + #include + #include +-/* FIXME: for gpio_get_value(), replace this by direct register read */ +-#include + #include + + #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 + diff --git a/queue-4.14/series b/queue-4.14/series index be22bb8015e..ab18cead581 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -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 index 00000000000..d1e5130423a --- /dev/null +++ b/queue-4.18/gpio-mxs-get-rid-of-external-api-call.patch @@ -0,0 +1,50 @@ +From 2a045977da9bf34c7525af8b05b4deaa5e26ea99 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +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 +Cc: Janusz Uzycki +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + 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 + #include + #include +-/* FIXME: for gpio_get_value(), replace this by direct register read */ +-#include + #include + + #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 + diff --git a/queue-4.18/series b/queue-4.18/series index 2cb359839c2..d98d059f3b7 100644 --- a/queue-4.18/series +++ b/queue-4.18/series @@ -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 index 00000000000..a447b3281e0 --- /dev/null +++ b/queue-4.19/gpio-mxs-get-rid-of-external-api-call.patch @@ -0,0 +1,50 @@ +From cb26b945146bed7b70de02abd9ea74433fd8afe5 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +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 +Cc: Janusz Uzycki +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + 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 + #include + #include +-/* FIXME: for gpio_get_value(), replace this by direct register read */ +-#include + #include + + #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 + diff --git a/queue-4.19/series b/queue-4.19/series index 71d208ab114..ddb4ef54c1b 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -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 index 00000000000..5914b7ec53c --- /dev/null +++ b/queue-4.9/gpio-mxs-get-rid-of-external-api-call.patch @@ -0,0 +1,50 @@ +From ba410a7089ef9c87c6f315de33fc92bc16c50e54 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +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 +Cc: Janusz Uzycki +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + 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 + #include + #include +-/* FIXME: for gpio_get_value(), replace this by direct register read */ +-#include + #include + + #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 + diff --git a/queue-4.9/series b/queue-4.9/series index f55613ed4d5..3241ecdc4d6 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -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