Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rafał Miłecki and committed by
John W. Linville
0f8ca014 2de21e58

+8 -1
+8 -1
drivers/bcma/driver_gpio.c
··· 218 218 #if IS_BUILTIN(CONFIG_BCMA_HOST_SOC) 219 219 chip->to_irq = bcma_gpio_to_irq; 220 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 229 /* There is just one SoC in one device and its GPIO addresses should be 223 230 * deterministic to address them more easily. The other buses could get 224 231 * a random base number. */