gpio/mpc8xxx: fix qoriq GPIO reading
PATCH 1/1 gpio/mpc8xxx: fix qoriq GPIO reading
Qoriq requires the IBE register to be set to enable GPIO inputs to be read. Set it.
Signed-off-by Russell King <[email protected]>
--- drivers/gpio/gpio-mpc8xxx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpio/gpio-mpc8xxx.c +4 -0
@@ -32,6 +32,7 @@#define GPIO_IMR 0x10#define GPIO_ICR 0x14#define GPIO_ICR2 0x18 +#define GPIO_IBE 0x18struct 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",
Signature · 1 line
2.20.1
Quoted 4 lines · Russell King
Qoriq requires the IBE register to be set to enable GPIO inputs to be read. Set it.
Signed-off-by Russell King <[email protected]>
Patch applied.
Yours,
Linus Walleij