summaryrefslogtreecommitdiffstats
path: root/drivers/ssb/main.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-11-20 22:24:33 +0000
committerJohn Crispin <blogic@openwrt.org>2012-11-21 21:55:52 +0100
commitec43b08b5733494ad88aa618ecdf534320dd8207 (patch)
tree0d11a7fca2c2baef2d8d3b14564f747b6319c20a /drivers/ssb/main.c
parent394bc7e38be79987ed15de203920c3cddb724cc1 (diff)
downloadop-kernel-dev-ec43b08b5733494ad88aa618ecdf534320dd8207.zip
op-kernel-dev-ec43b08b5733494ad88aa618ecdf534320dd8207.tar.gz
ssb: 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/4591 Acked-by: Florian Fainelli <florian@openwrt.org>
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r--drivers/ssb/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 6fe2d10..87f0ddf 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -798,6 +798,12 @@ static int __devinit ssb_bus_register(struct ssb_bus *bus,
ssb_chipcommon_init(&bus->chipco);
ssb_extif_init(&bus->extif);
ssb_mipscore_init(&bus->mipscore);
+ err = ssb_gpio_init(bus);
+ if (err == -ENOTSUPP)
+ ssb_dprintk(KERN_DEBUG PFX "GPIO driver not activated\n");
+ else if (err)
+ ssb_dprintk(KERN_ERR PFX
+ "Error registering GPIO driver: %i\n", err);
err = ssb_fetch_invariants(bus, get_invariants);
if (err) {
ssb_bus_may_powerdown(bus);
OpenPOWER on IntegriCloud