提交 73deb7dc 编写于 作者: A Alessandro Zummo 提交者: Russell King

[ARM] 3368/1: ixp4xx: set gpio direction in ixp4xx_config_irq

Patch from Alessandro Zummo

ixp4xx_config_irq did not configure the gpio line
as an input.

As an added bonus, the irq2gpio array has been converted
from int to char.
Signed-off-by: NAlessandro Zummo <a.zummo@towertech.it>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 03bd14c4
......@@ -91,7 +91,7 @@ static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type);
/*
* IRQ -> GPIO mapping table
*/
static int irq2gpio[32] = {
static char irq2gpio[32] = {
-1, -1, -1, -1, -1, -1, 0, 1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 2, 3, 4, 5, 6,
......@@ -153,6 +153,9 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
/* Set the new style */
*int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE));
/* Configure the line as an input */
gpio_line_config(line, IXP4XX_GPIO_IN);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册