aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/driver_gpio.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-03-20 16:09:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-03-27 14:20:04 -0400
commit0f8ca014614e30b7a0e01af612704c80e970feb3 (patch)
tree60d32f2bf68eaf3dcf9eda734a2b989e241b081e /drivers/bcma/driver_gpio.c
parent2de21e589989e490666d3ac70c9bc9fab943f969 (diff)
bcma: gpio: register 32 GPIOs on BCM5357
Some Broadcom boards have more GPIOs available. For example Linksys E3200 home router is based on SoC id 0x5357, package 0x0A and uses GPIO 23 to reset internal USB WiFi (gpio23=wombo_reset). Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/driver_gpio.c')
-rw-r--r--drivers/bcma/driver_gpio.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c
index 25f9887a35d0..d7f81ad56b8a 100644
--- a/drivers/bcma/driver_gpio.c
+++ b/drivers/bcma/driver_gpio.c
@@ -218,7 +218,14 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
218#if IS_BUILTIN(CONFIG_BCMA_HOST_SOC) 218#if IS_BUILTIN(CONFIG_BCMA_HOST_SOC)
219 chip->to_irq = bcma_gpio_to_irq; 219 chip->to_irq = bcma_gpio_to_irq;
220#endif 220#endif
221 chip->ngpio = 16; 221 switch (cc->core->bus->chipinfo.id) {
222 case BCMA_CHIP_ID_BCM5357:
223 chip->ngpio = 32;
224 break;
225 default:
226 chip->ngpio = 16;
227 }
228
222 /* There is just one SoC in one device and its GPIO addresses should be 229 /* There is just one SoC in one device and its GPIO addresses should be
223 * deterministic to address them more easily. The other buses could get 230 * deterministic to address them more easily. The other buses could get
224 * a random base number. */ 231 * a random base number. */