diff mbox

[03/03] ARM: shmobile: Consolidate Legacy GPIOLIB Kconfig bits

Message ID 20140825034559.9316.68303.sendpatchset@w520 (mailing list archive)
State Deferred
Headers show

Commit Message

Magnus Damm Aug. 25, 2014, 3:45 a.m. UTC
From: Magnus Damm <damm+renesas@opensource.se>

Consolidate ARCH_WANT_OPTIONAL_GPIOLIB under ARCH_SHMOBILE_LEGACY
so it can be shared by the legacy ARM mach-shmobile code.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 arch/arm/Kconfig               |    1 +
 arch/arm/mach-shmobile/Kconfig |    8 --------
 2 files changed, 1 insertion(+), 8 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Geert Uytterhoeven Aug. 25, 2014, 8:39 a.m. UTC | #1
Hi Magnus,

On Mon, Aug 25, 2014 at 5:45 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> Consolidate ARCH_WANT_OPTIONAL_GPIOLIB under ARCH_SHMOBILE_LEGACY
> so it can be shared by the legacy ARM mach-shmobile code.

Given
  - all legacy support for shmobile boards except ape6evm, koelsch, and lager
    select ARCH_REQUIRE_GPIOLIB,
  - the ape6evm, koelsch, and lager defconfigs have CONFIG_GPIOLIB=y,
shouldn't we just upgrade from ARCH_WANT_OPTIONAL_GPIOLIB
to ARCH_REQUIRE_GPIOLIB?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm Aug. 26, 2014, 9:28 a.m. UTC | #2
Hi Geert,

On Mon, Aug 25, 2014 at 5:39 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> Hi Magnus,
>
> On Mon, Aug 25, 2014 at 5:45 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> Consolidate ARCH_WANT_OPTIONAL_GPIOLIB under ARCH_SHMOBILE_LEGACY
>> so it can be shared by the legacy ARM mach-shmobile code.
>
> Given
>   - all legacy support for shmobile boards except ape6evm, koelsch, and lager
>     select ARCH_REQUIRE_GPIOLIB,
>   - the ape6evm, koelsch, and lager defconfigs have CONFIG_GPIOLIB=y,
> shouldn't we just upgrade from ARCH_WANT_OPTIONAL_GPIOLIB
> to ARCH_REQUIRE_GPIOLIB?

Sure, that is fine with me. I'm not sure if there is much point in
separating OPTIONAL and REQUIRE anymore.

Historically in case of legacy support code we let the SoC code
provide ARCH_WANT_OPTIONAL_GPIOLIB and then allow each board to
override with ARCH_REQUIRE_GPIOLIB in case they require PFC or GPIO.
The idea was that boards that need to configure the pin controller
would select REQUIRE, but this was done ages before PINCTRL existed
and we relied on GPIO for pin mux configuration. Boards that only
relied on pin controller settings from the boot loader would rely on
OPTIONAL (by not selecting REQUIRE) which would allow the user to not
compile in GPIO support.

These days we use PINCTRL for pin mux configuration anyway, so with
that in mind perhaps there is not much point with these GPIO bits..

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman Aug. 27, 2014, 12:10 a.m. UTC | #3
On Tue, Aug 26, 2014 at 06:28:31PM +0900, Magnus Damm wrote:
> Hi Geert,
> 
> On Mon, Aug 25, 2014 at 5:39 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
> > Hi Magnus,
> >
> > On Mon, Aug 25, 2014 at 5:45 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> >> Consolidate ARCH_WANT_OPTIONAL_GPIOLIB under ARCH_SHMOBILE_LEGACY
> >> so it can be shared by the legacy ARM mach-shmobile code.
> >
> > Given
> >   - all legacy support for shmobile boards except ape6evm, koelsch, and lager
> >     select ARCH_REQUIRE_GPIOLIB,
> >   - the ape6evm, koelsch, and lager defconfigs have CONFIG_GPIOLIB=y,
> > shouldn't we just upgrade from ARCH_WANT_OPTIONAL_GPIOLIB
> > to ARCH_REQUIRE_GPIOLIB?
> 
> Sure, that is fine with me. I'm not sure if there is much point in
> separating OPTIONAL and REQUIRE anymore.
> 
> Historically in case of legacy support code we let the SoC code
> provide ARCH_WANT_OPTIONAL_GPIOLIB and then allow each board to
> override with ARCH_REQUIRE_GPIOLIB in case they require PFC or GPIO.
> The idea was that boards that need to configure the pin controller
> would select REQUIRE, but this was done ages before PINCTRL existed
> and we relied on GPIO for pin mux configuration. Boards that only
> relied on pin controller settings from the boot loader would rely on
> OPTIONAL (by not selecting REQUIRE) which would allow the user to not
> compile in GPIO support.
> 
> These days we use PINCTRL for pin mux configuration anyway, so with
> that in mind perhaps there is not much point with these GPIO bits..

I am holding off on this patch until some consensus is reached
on it or an alternate patch is posted.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 0008/arch/arm/Kconfig
+++ work/arch/arm/Kconfig	2014-08-25 12:16:25.000000000 +0900
@@ -648,6 +648,7 @@  config ARCH_MSM
 config ARCH_SHMOBILE_LEGACY
 	bool "Renesas ARM SoCs (non-multiplatform)"
 	select ARCH_SHMOBILE
+	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_PATCH_PHYS_VIRT if MMU
 	select CLKDEV_LOOKUP
 	select CPU_V7
--- 0008/arch/arm/mach-shmobile/Kconfig
+++ work/arch/arm/mach-shmobile/Kconfig	2014-08-25 12:17:10.000000000 +0900
@@ -89,14 +89,12 @@  comment "Renesas ARM SoCs System Type"
 config ARCH_SH7372
 	bool "SH-Mobile AP4 (SH7372)"
 	select ARCH_RMOBILE
-	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_CPU_SUSPEND if PM || CPU_IDLE
 	select SH_INTC
 
 config ARCH_SH73A0
 	bool "SH-Mobile AG5 (R8A73A00)"
 	select ARCH_RMOBILE
-	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 	select I2C
 	select SH_INTC
@@ -105,33 +103,28 @@  config ARCH_SH73A0
 config ARCH_R8A73A4
 	bool "R-Mobile APE6 (R8A73A40)"
 	select ARCH_RMOBILE
-	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 	select RENESAS_IRQC
 
 config ARCH_R8A7740
 	bool "R-Mobile A1 (R8A77400)"
 	select ARCH_RMOBILE
-	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 	select RENESAS_INTC_IRQPIN
 
 config ARCH_R8A7778
 	bool "R-Car M1A (R8A77781)"
 	select ARCH_RCAR_GEN1
-	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 
 config ARCH_R8A7779
 	bool "R-Car H1 (R8A77790)"
 	select ARCH_RCAR_GEN1
-	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 
 config ARCH_R8A7790
 	bool "R-Car H2 (R8A77900)"
 	select ARCH_RCAR_GEN2
-	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 	select MIGHT_HAVE_PCI
 	select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
@@ -139,7 +132,6 @@  config ARCH_R8A7790
 config ARCH_R8A7791
 	bool "R-Car M2 (R8A77910)"
 	select ARCH_RCAR_GEN2
-	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_GIC
 	select MIGHT_HAVE_PCI
 	select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE