From: 沈睿汀 Date: Thu, 29 Apr 2010 09:19:35 +0000 (+0000) Subject: update for gpio X-Git-Tag: firefly_0821_release~11585 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=08700a4d62523a1f4e786efd10c017c3b5e917e2;p=firefly-linux-kernel-4.4.55.git update for gpio --- 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