但是我看提供的电路原理图你们也只用了GPX0~3来充当外部中断,其他组gpio也能当外部中断使用吗
而且drivers/gpio/gpio-samsung.c里面也只有GPX0~3提供了to_irq函数,gpio_to_irq最终调用的应该就是这个to_irq函数,其他组GPIO没有提供to_irq函数的话是不是就得不到中断号
{
.chip = {
.base = EXYNOS4X12_GPM4(0),
.ngpio = EXYNOS4X12_GPIO_M4_NR,
.label = "GPM4",
},
}, {
.base = (void *)0xC00,
.config = &samsung_gpio_cfgs[9],
.irq_base = IRQ_EINT(0),
.chip = {
.base = EXYNOS4_GPX0(0),
.ngpio = EXYNOS4_GPIO_X0_NR,
.label = "GPX0",
.to_irq = samsung_gpiolib_to_irq,
},
}, {
.config = &samsung_gpio_cfgs[9],
.irq_base = IRQ_EINT(8),
.chip = {
.base = EXYNOS4_GPX1(0),
.ngpio = EXYNOS4_GPIO_X1_NR,
.label = "GPX1",
.to_irq = samsung_gpiolib_to_irq,
},
}, {
.config = &samsung_gpio_cfgs[9],
.irq_base = IRQ_EINT(16),
.chip = {
.base = EXYNOS4_GPX2(0),
.ngpio = EXYNOS4_GPIO_X2_NR,
.label = "GPX2",
.to_irq = samsung_gpiolib_to_irq,
},
}, {
.config = &samsung_gpio_cfgs[9],
.irq_base = IRQ_EINT(24),
.chip = {
.base = EXYNOS4_GPX3(0),
.ngpio = EXYNOS4_GPIO_X3_NR,
.label = "GPX3",
.to_irq = samsung_gpiolib_to_irq,
},
},