devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] gpio: mpc8xxx: Enable port input and interrupt
@ 2019-05-29  8:32 Chuanhua Han
  2019-05-29  8:32 ` [PATCH 2/3] gpio: mpc8xxx: Use IRQF_SHARED mode to request IRQ Chuanhua Han
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chuanhua Han @ 2019-05-29  8:32 UTC (permalink / raw)
  To: shawnguo, leoyang.li, robh+dt, mark.rutland, linus.walleij,
	bgolaszewski
  Cc: linux-arm-kernel, devicetree, linux-kernel, linux-gpio,
	Chuanhua Han, 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 <ying.zhang22455@nxp.com>
Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com>
---
 drivers/gpio/gpio-mpc8xxx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index c8673a5d9412..555e0e7957d9 100644
--- a/drivers/gpio/gpio-mpc8xxx.c
+++ b/drivers/gpio/gpio-mpc8xxx.c
@@ -373,9 +373,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);
 
 	irq_set_chained_handler_and_data(mpc8xxx_gc->irqn,
 					 mpc8xxx_gpio_irq_cascade, mpc8xxx_gc);
-- 
2.17.1

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

end of thread, other threads:[~2019-08-03  7:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-29  8:32 [PATCH 1/3] gpio: mpc8xxx: Enable port input and interrupt Chuanhua Han
2019-05-29  8:32 ` [PATCH 2/3] gpio: mpc8xxx: Use IRQF_SHARED mode to request IRQ Chuanhua Han
2019-05-29 22:15   ` Li Yang
2019-05-29  8:32 ` [PATCH 3/3] arm64: dts: ls1088a: Revise gpio registers to little-endian Chuanhua Han
2019-07-31 23:19   ` Li Yang
2019-08-03  7:11   ` Shawn Guo
2019-05-29 21:53 ` [PATCH 1/3] gpio: mpc8xxx: Enable port input and interrupt Li Yang

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).