diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-11-20 17:24:30 -0500 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-11-21 15:55:52 -0500 |
commit | cf0936b06d8e98a157630e99f647e2ff6d29d7ad (patch) | |
tree | 651457e034e073d236e9b0e64e0008e4ed2e0150 /drivers/bcma/main.c | |
parent | 3e8bb507edfb44dfb8b0e06574826e34a8f6291d (diff) |
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>
Diffstat (limited to 'drivers/bcma/main.c')
-rw-r--r-- | drivers/bcma/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index d865470bc951..478ba01ca0c2 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c | |||
@@ -152,6 +152,11 @@ static int bcma_register_cores(struct bcma_bus *bus) | |||
152 | bcma_err(bus, "Error registering NAND flash\n"); | 152 | bcma_err(bus, "Error registering NAND flash\n"); |
153 | } | 153 | } |
154 | #endif | 154 | #endif |
155 | err = bcma_gpio_init(&bus->drv_cc); | ||
156 | if (err == -ENOTSUPP) | ||
157 | bcma_debug(bus, "GPIO driver not activated\n"); | ||
158 | else if (err) | ||
159 | bcma_err(bus, "Error registering GPIO driver: %i\n", err); | ||
155 | 160 | ||
156 | return 0; | 161 | return 0; |
157 | } | 162 | } |