diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ec57b095f1ee..b252195a9708 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -709,6 +709,7 @@ config ARCH_RK2818 select COMMON_CLKDEV select GENERIC_TIME select GENERIC_CLOCKEVENTS + select ARCH_REQUIRE_GPIOLIB help Support for Rockchip RK2818 soc. diff --git a/arch/arm/mach-rk2818/include/mach/irqs.h b/arch/arm/mach-rk2818/include/mach/irqs.h index d6b94df7bcd1..096bd203f7e1 100644 --- a/arch/arm/mach-rk2818/include/mach/irqs.h +++ b/arch/arm/mach-rk2818/include/mach/irqs.h @@ -42,7 +42,11 @@ #define IRQ_REG_PLEVEL 0xd8//IRQ System Priority Level Register -#define NR_IRQS (48) +/*定义RK2818的最大中断数目。NR_AIC_IRQS表示RK2818的中断寄存器支持的最大中断数目, +CONFIG_RK28_GPIO_IRQ表示RK2818的GPIO复用的最大中断数目,CONFIG_EXTEND_GPIO_IRQ表示RK2818的 +扩展IO复用的最大中断数目。*/ +#define NR_AIC_IRQS 48 +#define NR_IRQS (NR_AIC_IRQS + CONFIG_RK28_GPIO_IRQ + CONFIG_EXTEND_GPIO_IRQ) /*irq number*/ diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 2ad0128c63c6..04383183cf57 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -230,4 +230,19 @@ config GPIO_UCB1400 To compile this driver as a module, choose M here: the module will be called ucb1400_gpio. +config GPIO_TCA6424 + bool "TCA6424 extend GPIO" + depends on I2C + help + Say yes here to access the TCA6424 extend GPIO + +config ARCH_EXTEND_GPIOS + int + default 24 if GPIO_TCA6424 + default 0 + +config EXTEND_GPIO_IRQ + int + default 3 if GPIO_TCA6424 + default 0 endif