|
|
@@ -479,17 +479,26 @@
|
|
|
|
|
|
chip->label = "bcma_gpio";
|
|
|
chip->owner = THIS_MODULE;
|
|
|
-@@ -95,7 +215,9 @@ int bcma_gpio_init(struct bcma_drv_cc *c
|
|
|
+@@ -95,8 +215,17 @@ int bcma_gpio_init(struct bcma_drv_cc *c
|
|
|
chip->set = bcma_gpio_set_value;
|
|
|
chip->direction_input = bcma_gpio_direction_input;
|
|
|
chip->direction_output = bcma_gpio_direction_output;
|
|
|
+#if IS_BUILTIN(CONFIG_BCMA_HOST_SOC)
|
|
|
chip->to_irq = bcma_gpio_to_irq;
|
|
|
+- chip->ngpio = 16;
|
|
|
+#endif
|
|
|
- chip->ngpio = 16;
|
|
|
++ switch (cc->core->bus->chipinfo.id) {
|
|
|
++ case BCMA_CHIP_ID_BCM5357:
|
|
|
++ chip->ngpio = 32;
|
|
|
++ break;
|
|
|
++ default:
|
|
|
++ chip->ngpio = 16;
|
|
|
++ }
|
|
|
++
|
|
|
/* There is just one SoC in one device and its GPIO addresses should be
|
|
|
* deterministic to address them more easily. The other buses could get
|
|
|
-@@ -105,10 +227,21 @@ int bcma_gpio_init(struct bcma_drv_cc *c
|
|
|
+ * a random base number. */
|
|
|
+@@ -105,10 +234,21 @@ int bcma_gpio_init(struct bcma_drv_cc *c
|
|
|
else
|
|
|
chip->base = -1;
|
|
|
|