o_chip *chip, unsigned offset);
void(*dbg_show)(struct seq_file *s, struct gpio_chip *chip); intbase; u16ngpio; unsignedcan_sleep:1; unsignedexported:1; };
再看具体的实例:
static struct s3c_gpio_chipgpio_4bit[] = {与上面第一个相对应 { .base= S3C64XX_GPA_BASE, .config= &gpio_4bit_cfg_eint0111, .chip= { .base= S3C64XX_GPA(0), .ngpio= S3C64XX_GPIO_A_NR, .label= "GPA", }, }, { .base= S3C64XX_GPB_BASE, .config= &gpio_4bit_cfg_eint0111, .chip= { .base= S3C64XX_GPB(0), .ngpio= S3C64XX_GPIO_B_NR, .label= "GPB", }, }, { .base= S3C64XX_GPC_BASE, .config= &gpio_4bit_cfg_eint0111, .chip= { .base= S3C64XX_GPC(0), .ngpio= S3C64XX_GPIO_C_NR, .label= "GPC", }, }, { .base= S3C64XX_GPD_BASE, .config= &gpio_4bit_cfg_eint0111, .chip= { .base= S3C64XX_GPD(0), .ngpio= S3C64XX_GPIO_D_NR, .label= "GPD", }, }, { .base= S3C64XX_GPE_BASE, .config= &gpio_4bit_cfg_noint, .chip= { .base= S3C64XX_GPE(0), .ngpio= S3C64XX_GPIO_E_NR, .label= "GPE", }, }, { .base= S3C64XX_GPG_BASE, .config= &gpio_4bit_cfg_eint0111, .chip= { .base= S3C64XX_GPG(0), .ngpio= S3C64XX_GPIO_G_NR, .label= "GPG", }, }, { .base= S3C64XX_GPM_BASE, .config= &gpio_4bit_cfg_eint0011, .chip= { .base= S3C64XX_GPM(0), .ngpio= S3C64XX_GPIO_M_NR, .label= "GPM", }, }, };
|