第二部分:
static struct s3c_gpio_chipgpio_4bit2[] = {与上面第二个相对应
{
.base= S3C64XX_GPH_BASE + 0x4,
.config= &gpio_4bit_cfg_eint0111,
.chip= {
.base= S3C64XX_GPH(0),
.ngpio= S3C64XX_GPIO_H_NR,
.label= "GPH",
},
}, {
.base= S3C64XX_GPK_BASE + 0x4,
.config= &gpio_4bit_cfg_noint,
.chip= {
.base= S3C64XX_GPK(0),
.ngpio= S3C64XX_GPIO_K_NR,
.label= "GPK",
},
}, {
.base= S3C64XX_GPL_BASE + 0x4,
.config= &gpio_4bit_cfg_eint0011,
.chip= {
.base= S3C64XX_GPL(0),
.ngpio= S3C64XX_GPIO_L_NR,
.label= "GPL",
},
},
};
第三部分:
static struct s3c_gpio_chipgpio_2bit[]= {与上面第三个相对应
{
.base= S3C64XX_GPF_BASE,
.config= &gpio_2bit_cfg_eint11,
.chip= {
.base= S3C64XX_GPF(0),
.ngpio= S3C64XX_GPIO_F_NR,
.label= "GPF",
},
}, {
.base= S3C64XX_GPI_BASE,
.config= &gpio_2bit_cfg_noint,
.chip= {
.base= S3C64XX_GPI(0),
.ngpio= S3C64XX_GPIO_I_NR,
.label= "GPI",
},
}, {
.base= S3C64XX_GPJ_BASE,
.config= &gpio_2bit_cfg_noint,
.chip= {
.base= S3C64XX_GPJ(0),
.ngpio= S3C64XX_GPIO_J_NR,
.label= "GPJ",
},
}, {
.base= S3C64XX_GPN_BASE,
.config= &gpio_2bit_cfg_eint10,
.chip= {
.base= S3C64XX_GPN(0),
.ngpio= S3C64XX_GPIO_N_NR,
.label= "GPN",
},
}, {
.base= S3C64XX_GPO_BASE,
.config= &gpio_2bit_cfg_eint11,
.chip= {
.base= S3C64XX_GPO(0),
.ngpio= S3C64XX_GPIO_O_NR,
.label= "GPO",
},
}, {
.base= S3C64XX_GPP_BASE,
.config= &gpio_2bit_cfg_eint11,
.chip= {
.base= S3C64XX_GPP(0),
.ngpio= S3C64XX_GPIO_P_NR,
.label= "GPP",
},
}, {
.base= S3C64XX_GPQ_BASE,
.config= &gpio_2bit_cfg_eint11,
.chip= {
.base= S3C64XX_GPQ(0),
.ngpio= S3C64XX_GPIO_Q_NR,
.label= "GPQ",
},
},
};
.config= &gpio_2bit_cfg_eint11类似的这些是什么呢?这涉及到上面的结构体
struct s3c_gpio_chip {
struct gpio_chip chip;
struct s3c_gpio_cfg*config;
void __iomem*base;
};
