IMX6Q GPIO定义

ret = gpio_request_array(mx6q_sabresd_flexcan_gpios,
                        ARRAY_SIZE(mx6q_sabresd_flexcan_gpios));

static struct gpio mx6q_sabresd_flexcan_gpios[] = {
        { SABRESD_CAN1_STBY, GPIOF_OUT_INIT_LOW, "flexcan1-stby" },
};

#define SABRESD_CAN1_STBY                IMX_GPIO_NR(4, 5)

/* There's a off-by-one betweem the gpio bank number and the gpiochip */
/* range e.g. GPIO_1_5 is gpio 5 under linux */
#define IMX_GPIO_NR(bank, nr)                (((bank) - 1) * 32 + (nr))


以下的bank ,nr是什么意思? 
#define IMX_GPIO_NR(bank, nr)                (((bank) - 1) * 32 + (nr))
posted @ 2018-05-18 14:52  瘋耔  阅读(355)  评论(0编辑  收藏  举报
跳至侧栏