bcma: add GPIO driver

Register a GPIO driver to access the GPIOs provided by the chip.
The GPIOs of the SoC should always start at 0 and the other GPIOs could
start at a random position. There is just one SoC in a system and when
they start at 0 the number is predictable.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: http://patchwork.linux-mips.org/patch/4587
Acked-by: Florian Fainelli <florian@openwrt.org>
This commit is contained in:
Hauke Mehrtens
2012-11-20 22:24:30 +00:00
committed by John Crispin
parent 3e8bb507ed
commit cf0936b06d
6 changed files with 128 additions and 0 deletions
+5
View File
@@ -152,6 +152,11 @@ static int bcma_register_cores(struct bcma_bus *bus)
bcma_err(bus, "Error registering NAND flash\n");
}
#endif
err = bcma_gpio_init(&bus->drv_cc);
if (err == -ENOTSUPP)
bcma_debug(bus, "GPIO driver not activated\n");
else if (err)
bcma_err(bus, "Error registering GPIO driver: %i\n", err);
return 0;
}