Skip to contentSkip to conversation

bcma: gpio: register all 32 GPIOs

PATCH In review Rafał Miłecki 3 participants 7 messages Feb 13, 2014 – Feb 14, 2014 Broadcom specific amba driver (bcma)

lore
Share & tools
lore

Rafał Miłecki

author maintainer
#0 lore raw

PATCH 1/1 bcma: gpio: register all 32 GPIOs

Broadcom boards have 32 GPIOs (not 16) and these higher ones are actually used on some devices (for buttons, reset of WiFi devices).

---
Similar patch may be needed for ssb, however I didn't meet any ssb SoC with GPIOs 16-31 connected to anything.
This is so trivial I hope it can go as a fix for 3.14. It allows support for some devices that use these higher GPIOs.

---
 drivers/bcma/driver_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bcma/driver_gpio.c +1 -1
index 25f9887..2f0ceac 100644
@@ -218,7 +218,7 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
 #if IS_BUILTIN(CONFIG_BCMA_HOST_SOC)
 	chip->to_irq		= bcma_gpio_to_irq;
 #endif
-	chip->ngpio		= 16;
+	chip->ngpio		= 32;
 	/* 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
 	 * a random base number. */
Signature · 1 line
1.8.4.5
author maintainer
#1 lore raw

2014-02-13 18:06 GMT+01:00 Rafał Miłecki <[email protected]>:

Quoted 2 lines

Broadcom boards have 32 GPIOs (not 16) and these higher ones are actually used on some devices (for buttons, reset of WiFi devices).

I forgot about one important thing. This patch is based on top of changes from 3.14-rc1.

John: do you plan to pull David's net.git tree into your wireless.git?

#2 lore raw
Quoted 8 lines · Rafał Miłecki

2014-02-13 18:06 GMT+01:00 Rafał Miłecki <[email protected]>:

Quoted 2 lines

Broadcom boards have 32 GPIOs (not 16) and these higher ones are actually used on some devices (for buttons, reset of WiFi devices).

I forgot about one important thing. This patch is based on top of changes from 3.14-rc1.

John: do you plan to pull David's net.git tree into your wireless.git?

No.

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#3 lore raw
In reply to Rafał Miłecki
Quoted 4 lines · Rafał Miłecki

Broadcom boards have 32 GPIOs (not 16) and these higher ones are actually used on some devices (for buttons, reset of WiFi devices).

Quoted 9 lines

---
Similar patch may be needed for ssb, however I didn't meet any ssb SoC with GPIOs 16-31 connected to anything.
This is so trivial I hope it can go as a fix for 3.14. It allows support for some devices that use these higher GPIOs.

---
 drivers/bcma/driver_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Are you sure all the bcma SoC have 32 GPIO lines or is there no problem when they do not? For at least some ssb based SoCs I know that they only have 16 GPIO lines.

Hauke

author maintainer
#4 lore raw

2014-02-14 0:34 GMT+01:00 Hauke Mehrtens <[email protected]>:

Quoted 14 lines · Rafał Miłecki
Quoted 4 lines

Broadcom boards have 32 GPIOs (not 16) and these higher ones are actually used on some devices (for buttons, reset of WiFi devices).

Quoted 9 lines

---
Similar patch may be needed for ssb, however I didn't meet any ssb SoC with GPIOs 16-31 connected to anything.
This is so trivial I hope it can go as a fix for 3.14. It allows support for some devices that use these higher GPIOs.

---
 drivers/bcma/driver_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 3 lines

Are you sure all the bcma SoC have 32 GPIO lines or is there no problem when they do not? For at least some ssb based SoCs I know that they only have 16 GPIO lines.

Damn, I'm afraid you may be right. I didn't think about that.

I was able to find references to GPIOs 16-31 on BCM5357 based boards only.

Signature · 1 line
Rafał
#5 lore raw
Quoted 15 lines · Rafał Miłecki

2014-02-14 0:34 GMT+01:00 Hauke Mehrtens <[email protected]>:

Quoted 14 lines · Rafał Miłecki
Quoted 13 lines

Broadcom boards have 32 GPIOs (not 16) and these higher ones are actually used on some devices (for buttons, reset of WiFi devices).

---
Similar patch may be needed for ssb, however I didn't meet any ssb SoC with GPIOs 16-31 connected to anything.
This is so trivial I hope it can go as a fix for 3.14. It allows support for some devices that use these higher GPIOs.

---
 drivers/bcma/driver_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines
Quoted 3 lines

Are you sure all the bcma SoC have 32 GPIO lines or is there no problem when they do not? For at least some ssb based SoCs I know that they only have 16 GPIO lines.

Damn, I'm afraid you may be right. I didn't think about that.

I was able to find references to GPIOs 16-31 on BCM5357 based boards only.

Sounds like I need to revert that patch.

Please never, _ever_, post a patch (no matter how trivial) for the stable tree unless you are absolutely sure about it in the first place.

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
author maintainer
#6 lore raw

2014-02-14 15:27 GMT+01:00 John W. Linville <[email protected]>:

Quoted 20 lines · Rafał Miłecki
Quoted 19 lines

2014-02-14 0:34 GMT+01:00 Hauke Mehrtens <[email protected]>:

Quoted 17 lines · Rafał Miłecki
Quoted 4 lines

Broadcom boards have 32 GPIOs (not 16) and these higher ones are actually used on some devices (for buttons, reset of WiFi devices).

Quoted 9 lines

---
Similar patch may be needed for ssb, however I didn't meet any ssb SoC with GPIOs 16-31 connected to anything.
This is so trivial I hope it can go as a fix for 3.14. It allows support for some devices that use these higher GPIOs.

---
 drivers/bcma/driver_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Are you sure all the bcma SoC have 32 GPIO lines or is there no problem when they do not? For at least some ssb based SoCs I know that they only have 16 GPIO lines.

Quoted 8 lines
Quoted 3 lines

Damn, I'm afraid you may be right. I didn't think about that.

I was able to find references to GPIOs 16-31 on BCM5357 based boards only.

Sounds like I need to revert that patch.

Please never, _ever_, post a patch (no matter how trivial) for the stable tree unless you are absolutely sure about it in the first place.

I'm sorry. I got blinded by the triviality :(

Signature · 1 line
Rafał