Skip to contentSkip to conversation

ARM: BCM5301X: select GPIOLIB as optional

PATCH In review Rafał Miłecki 2 participants 7 messages Sep 20, 2014 – Sep 21, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: BCM5301X: select GPIOLIB as optional

All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs and buttons.

---
 arch/arm/mach-bcm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-bcm/Kconfig +2 -0
index fc93800..d967c98 100644
@@ -80,8 +80,10 @@ config ARCH_BCM2835
 
 config ARCH_BCM_5301X
 	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 	select CACHE_L2X0
+	select GPIOLIB
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
 	select ARM_GLOBAL_TIMER
Signature · 1 line
1.8.4.5
#1 lore raw

Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <[email protected]>:

Quoted 13 lines

All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs and buttons.

---
 arch/arm/mach-bcm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-bcm/Kconfig +0 -0
index fc93800..d967c98 100644

arch/arm/mach-bcm/Kconfig config ARCH_BCM2835 · line 86

Quoted 7 lines
arch/arm/mach-bcm/Kconfig +2 -0
@@ -80,8 +80,10 @@ config ARCH_BCM2835
 
 config ARCH_BCM_5301X
 	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 	select CACHE_L2X0
+	select GPIOLIB

...

GPIOLIB is selected automatically by ARCH_WANT_OPTIONAL_GPIOLIB.

---

#2 lore raw

PATCH 1/1 ARM: BCM5301X: select GPIOLIB as optional

Quoted 23 lines · Alexander Shiyan

Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <[email protected]>:

Quoted 20 lines

All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs and buttons.

---
 arch/arm/mach-bcm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-bcm/Kconfig +2 -0
index fc93800..d967c98 100644
@@ -80,8 +80,10 @@ config ARCH_BCM2835
 
 config ARCH_BCM_5301X
      bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+     select ARCH_WANT_OPTIONAL_GPIOLIB
      select ARM_GIC
      select CACHE_L2X0
+     select GPIOLIB

...

Quoted 1 line

GPIOLIB is selected automatically by ARCH_WANT_OPTIONAL_GPIOLIB.

I don't think so, I believe selecting is done by ARCH_REQUIRE_GPIOLIB only.

Reading drivers/gpio/Kconfig confuses me a bit. I believe I should select ARCH_WANT_OPTIONAL_GPIOLIB, because the board can boot without GPIOs, they are needed for LEDs and buttons only. Also most users will want LEDs and buttons, so I "select GPIOLIB".

Signature · 1 line
Rafa?
#3 lore raw

Sat, 20 Sep 2014 22:00:37 +0200 ?? Rafa? Mi?ecki <[email protected]>:

Quoted 24 lines · Alexander Shiyan
Quoted 23 lines

Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <[email protected]>:

Quoted 20 lines

All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs and buttons.

---
 arch/arm/mach-bcm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-bcm/Kconfig +2 -0
index fc93800..d967c98 100644
@@ -80,8 +80,10 @@ config ARCH_BCM2835
 
 config ARCH_BCM_5301X
      bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+     select ARCH_WANT_OPTIONAL_GPIOLIB
      select ARM_GIC
      select CACHE_L2X0
+     select GPIOLIB

...

Quoted 8 lines
Quoted 1 line

GPIOLIB is selected automatically by ARCH_WANT_OPTIONAL_GPIOLIB.

I don't think so, I believe selecting is done by ARCH_REQUIRE_GPIOLIB only.

Reading drivers/gpio/Kconfig confuses me a bit. I believe I should select ARCH_WANT_OPTIONAL_GPIOLIB, because the board can boot without GPIOs, they are needed for LEDs and buttons only. Also most users will want LEDs and buttons, so I "select GPIOLIB".

Yes, my bad :)

ARCH_REQUIRE_GPIOLIB selects GPIOLIB. ARCH_WANT_OPTIONAL_GPIOLIB make GPIOLIB user selectable, so, in any case you need to add ARCH_WANT_OPTIONAL_GPIOLIB only.

---

#4 lore raw

PATCH 1/1 ARM: BCM5301X: select GPIOLIB as optional

Quoted 34 lines · Alexander Shiyan

Sat, 20 Sep 2014 22:00:37 +0200 ?? Rafa? Mi?ecki <[email protected]>:

Quoted 24 lines · Alexander Shiyan
Quoted 23 lines

Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <[email protected]>:

Quoted 20 lines

All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs and buttons.

---
 arch/arm/mach-bcm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-bcm/Kconfig +2 -0
index fc93800..d967c98 100644
@@ -80,8 +80,10 @@ config ARCH_BCM2835
 
 config ARCH_BCM_5301X
      bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+     select ARCH_WANT_OPTIONAL_GPIOLIB
      select ARM_GIC
      select CACHE_L2X0
+     select GPIOLIB

...

Quoted 8 lines
Quoted 1 line

GPIOLIB is selected automatically by ARCH_WANT_OPTIONAL_GPIOLIB.

I don't think so, I believe selecting is done by ARCH_REQUIRE_GPIOLIB only.

Reading drivers/gpio/Kconfig confuses me a bit. I believe I should select ARCH_WANT_OPTIONAL_GPIOLIB, because the board can boot without GPIOs, they are needed for LEDs and buttons only. Also most users will want LEDs and buttons, so I "select GPIOLIB".

Quoted 5 lines

Yes, my bad :)

ARCH_REQUIRE_GPIOLIB selects GPIOLIB. ARCH_WANT_OPTIONAL_GPIOLIB make GPIOLIB user selectable, so, in any case you need to add ARCH_WANT_OPTIONAL_GPIOLIB only.

So is there any way to make GPIOLIB optional (by using ARCH_WANT_OPTIONAL_GPIOLIB) and make it enabled by default? I wish GPIOLIB to be enabled by default as 99% users will want it.

Signature · 1 line
Rafa?
#5 lore raw

Sat, 20 Sep 2014 22:23:00 +0200 ?? Rafa? Mi?ecki <[email protected]>:

Quoted 37 lines · Alexander Shiyan
Quoted 36 lines

Sat, 20 Sep 2014 22:00:37 +0200 ?? Rafa? Mi?ecki <[email protected]>:

Quoted 24 lines · Alexander Shiyan
Quoted 23 lines

Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <[email protected]>:

Quoted 20 lines

All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs and buttons.

---
 arch/arm/mach-bcm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-bcm/Kconfig +2 -0
index fc93800..d967c98 100644
@@ -80,8 +80,10 @@ config ARCH_BCM2835
 
 config ARCH_BCM_5301X
      bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+     select ARCH_WANT_OPTIONAL_GPIOLIB
      select ARM_GIC
      select CACHE_L2X0
+     select GPIOLIB

...

Quoted 8 lines
Quoted 1 line

GPIOLIB is selected automatically by ARCH_WANT_OPTIONAL_GPIOLIB.

I don't think so, I believe selecting is done by ARCH_REQUIRE_GPIOLIB only.

Reading drivers/gpio/Kconfig confuses me a bit. I believe I should select ARCH_WANT_OPTIONAL_GPIOLIB, because the board can boot without GPIOs, they are needed for LEDs and buttons only. Also most users will want LEDs and buttons, so I "select GPIOLIB".

Yes, my bad :)

Quoted 7 lines
Quoted 3 lines

ARCH_REQUIRE_GPIOLIB selects GPIOLIB. ARCH_WANT_OPTIONAL_GPIOLIB make GPIOLIB user selectable, so, in any case you need to add ARCH_WANT_OPTIONAL_GPIOLIB only.

So is there any way to make GPIOLIB optional (by using ARCH_WANT_OPTIONAL_GPIOLIB) and make it enabled by default? I wish GPIOLIB to be enabled by default as 99% users will want it.

Not so elegant, but you can select GPIOLIB for particular boards, which contain GPIO functionality. I add Linus Walleij to CC for possible comments on this.

---

#6 lore raw

PATCH v2 1/1 ARM: BCM5301X: select GPIOLIB as optional

In reply to Rafał Miłecki

All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs and buttons.

---
V2: Don't select GPIOLIB. We may still think about making it default at
some point, but we dont' really require it to boot successfully.

---
 arch/arm/mach-bcm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-bcm/Kconfig +1 -0
index fc93800..cf230dc3 100644
@@ -80,6 +80,7 @@ config ARCH_BCM2835
 
 config ARCH_BCM_5301X
 	bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
+	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 	select CACHE_L2X0
 	select HAVE_ARM_SCU if SMP
Signature · 1 line
1.8.4.5