embedded and BSP newbie here. Recently I found a term named "gpio bank", but I cannot find good resources from google.
- What's it?
- difference of gpio bank and gpio controller?
- difference of gpio bank and pin
linux kernel code sample:
soc->bank_num = of_irq_count(child);
if (soc->bank_num == 0 || soc->bank_num > GPIO_MAX_BANK_NUM) {
dev_err(&pdev->dev, "Invalid gpio bank(irq)\n");
return -EINVAL;
}
for (i = 0; i < soc->bank_num; i++) {
res = platform_get_resource(pdev, IORESOURCE_MEM, i);
if (res == NULL) {
dev_err(&pdev->dev, "no mem resource for gpio[%d]!\n", i);
return -ENXIO;
}
soc->regbase[i] = devm_ioremap(&pdev->dev,
res->start, resource_size(res));
if (soc->regbase[i] == 0) {
dev_err(&pdev->dev, "devm_ioremap() failed\n");
return -ENOMEM;
}
}