armv8: GPIO: enable port input and interrupt
diff mbox series

Message ID
State New, archived
Headers show
  • armv8: GPIO: enable port input and interrupt
Related show

Commit Message Nov. 29, 2018, 8:51 a.m. UTC
From: Zhang Ying-22455 <>

The GPIO Input Buffer Enable register is used to control the input
enable of each individual GPIO port. When an individual GPIO port’s
direction is set to input (GPIO_GPDIR[DRn=0]), the associated input
enable must be set (GPIOxGPIE[IEn]=1) to propagate the port value to
the GPIO Data Register.

This patch enable port input and interrupt.

Signed-off-by: Zhang Ying-22455 <>
 drivers/gpio/gpio-mpc8xxx.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff mbox series

diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index 793518a..f97cd23 100644
--- a/drivers/gpio/gpio-mpc8xxx.c
+++ b/drivers/gpio/gpio-mpc8xxx.c
@@ -362,9 +362,10 @@  static int mpc8xxx_probe(struct platform_device *pdev)
 	if (!mpc8xxx_gc->irq)
 		return 0;
-	/* ack and mask all irqs */
+	/* ack and enable irqs */
 	gc->write_reg(mpc8xxx_gc->regs + GPIO_IER, 0xffffffff);
-	gc->write_reg(mpc8xxx_gc->regs + GPIO_IMR, 0);
+	gc->write_reg(mpc8xxx_gc->regs + GPIO_IMR, 0xffffffff);
+	gc->write_reg(mpc8xxx_gc->regs + GPIO_ICR2, 0xffffffff);
 					 mpc8xxx_gpio_irq_cascade, mpc8xxx_gc);