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))
还有IMX6Q里的GPIO口是怎么定义的,看半天没看懂,IMX集成器配置有点复杂!
|