linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio/mpc8xxx: fix qoriq GPIO reading
@ 2019-11-19 13:10 Russell King
  2019-11-21 13:30 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2019-11-19 13:10 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Bartosz Golaszewski, linux-gpio

Qoriq requires the IBE register to be set to enable GPIO inputs to be
read.  Set it.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/gpio/gpio-mpc8xxx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index c8673a5d9412..c7ac14f06837 100644
--- a/drivers/gpio/gpio-mpc8xxx.c
+++ b/drivers/gpio/gpio-mpc8xxx.c
@@ -32,6 +32,7 @@
 #define GPIO_IMR		0x10
 #define GPIO_ICR		0x14
 #define GPIO_ICR2		0x18
+#define GPIO_IBE		0x18
 
 struct mpc8xxx_gpio_chip {
 	struct gpio_chip	gc;
@@ -357,6 +358,9 @@ static int mpc8xxx_probe(struct platform_device *pdev)
 
 	gc->to_irq = mpc8xxx_gpio_to_irq;
 
+	if (of_device_is_compatible(np, "fsl,qoriq-gpio"))
+		gc->write_reg(mpc8xxx_gc->regs + GPIO_IBE, 0xffffffff);
+
 	ret = gpiochip_add_data(gc, mpc8xxx_gc);
 	if (ret) {
 		pr_err("%pOF: GPIO chip registration failed with status %d\n",
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio/mpc8xxx: fix qoriq GPIO reading
  2019-11-19 13:10 [PATCH] gpio/mpc8xxx: fix qoriq GPIO reading Russell King
@ 2019-11-21 13:30 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2019-11-21 13:30 UTC (permalink / raw)
  To: Russell King; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM

On Tue, Nov 19, 2019 at 2:10 PM Russell King <rmk+kernel@armlinux.org.uk> wrote:

> Qoriq requires the IBE register to be set to enable GPIO inputs to be
> read.  Set it.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-21 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 13:10 [PATCH] gpio/mpc8xxx: fix qoriq GPIO reading Russell King
2019-11-21 13:30 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).