* [PATCH] ARM: BCM5301X: select GPIOLIB as optional
@ 2014-09-20 16:41 Rafał Miłecki
2014-09-20 17:00 ` Alexander Shiyan
2014-09-21 14:07 ` [PATCH V2] " Rafał Miłecki
0 siblings, 2 replies; 7+ messages in thread
From: Rafał Miłecki @ 2014-09-20 16:41 UTC (permalink / raw)
To: linux-arm-kernel
All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs
and buttons.
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
arch/arm/mach-bcm/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index fc93800..d967c98 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -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
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: BCM5301X: select GPIOLIB as optional
2014-09-20 16:41 [PATCH] ARM: BCM5301X: select GPIOLIB as optional Rafał Miłecki
@ 2014-09-20 17:00 ` Alexander Shiyan
2014-09-20 20:00 ` Rafał Miłecki
2014-09-21 14:07 ` [PATCH V2] " Rafał Miłecki
1 sibling, 1 reply; 7+ messages in thread
From: Alexander Shiyan @ 2014-09-20 17:00 UTC (permalink / raw)
To: linux-arm-kernel
Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <zajec5@gmail.com>:
> All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs
> and buttons.
>
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> ---
> arch/arm/mach-bcm/Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> index fc93800..d967c98 100644
> --- a/arch/arm/mach-bcm/Kconfig
> +++ b/arch/arm/mach-bcm/Kconfig
> @@ -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.
---
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM: BCM5301X: select GPIOLIB as optional
2014-09-20 17:00 ` Alexander Shiyan
@ 2014-09-20 20:00 ` Rafał Miłecki
2014-09-20 20:14 ` Alexander Shiyan
0 siblings, 1 reply; 7+ messages in thread
From: Rafał Miłecki @ 2014-09-20 20:00 UTC (permalink / raw)
To: linux-arm-kernel
On 20 September 2014 19:00, Alexander Shiyan <shc_work@mail.ru> wrote:
> Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <zajec5@gmail.com>:
>> All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs
>> and buttons.
>>
>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>> ---
>> arch/arm/mach-bcm/Kconfig | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
>> index fc93800..d967c98 100644
>> --- a/arch/arm/mach-bcm/Kconfig
>> +++ b/arch/arm/mach-bcm/Kconfig
>> @@ -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.
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".
--
Rafa?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: BCM5301X: select GPIOLIB as optional
2014-09-20 20:00 ` Rafał Miłecki
@ 2014-09-20 20:14 ` Alexander Shiyan
2014-09-20 20:23 ` Rafał Miłecki
0 siblings, 1 reply; 7+ messages in thread
From: Alexander Shiyan @ 2014-09-20 20:14 UTC (permalink / raw)
To: linux-arm-kernel
Sat, 20 Sep 2014 22:00:37 +0200 ?? Rafa? Mi?ecki <zajec5@gmail.com>:
> On 20 September 2014 19:00, Alexander Shiyan <shc_work@mail.ru> wrote:
> > Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <zajec5@gmail.com>:
> >> All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs
> >> and buttons.
> >>
> >> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> >> ---
> >> arch/arm/mach-bcm/Kconfig | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> >> index fc93800..d967c98 100644
> >> --- a/arch/arm/mach-bcm/Kconfig
> >> +++ b/arch/arm/mach-bcm/Kconfig
> >> @@ -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.
>
> 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.
---
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM: BCM5301X: select GPIOLIB as optional
2014-09-20 20:14 ` Alexander Shiyan
@ 2014-09-20 20:23 ` Rafał Miłecki
2014-09-20 20:30 ` Alexander Shiyan
0 siblings, 1 reply; 7+ messages in thread
From: Rafał Miłecki @ 2014-09-20 20:23 UTC (permalink / raw)
To: linux-arm-kernel
On 20 September 2014 22:14, Alexander Shiyan <shc_work@mail.ru> wrote:
> Sat, 20 Sep 2014 22:00:37 +0200 ?? Rafa? Mi?ecki <zajec5@gmail.com>:
>> On 20 September 2014 19:00, Alexander Shiyan <shc_work@mail.ru> wrote:
>> > Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <zajec5@gmail.com>:
>> >> All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs
>> >> and buttons.
>> >>
>> >> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>> >> ---
>> >> arch/arm/mach-bcm/Kconfig | 2 ++
>> >> 1 file changed, 2 insertions(+)
>> >>
>> >> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
>> >> index fc93800..d967c98 100644
>> >> --- a/arch/arm/mach-bcm/Kconfig
>> >> +++ b/arch/arm/mach-bcm/Kconfig
>> >> @@ -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.
>>
>> 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.
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.
--
Rafa?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: BCM5301X: select GPIOLIB as optional
2014-09-20 20:23 ` Rafał Miłecki
@ 2014-09-20 20:30 ` Alexander Shiyan
0 siblings, 0 replies; 7+ messages in thread
From: Alexander Shiyan @ 2014-09-20 20:30 UTC (permalink / raw)
To: linux-arm-kernel
Sat, 20 Sep 2014 22:23:00 +0200 ?? Rafa? Mi?ecki <zajec5@gmail.com>:
> On 20 September 2014 22:14, Alexander Shiyan <shc_work@mail.ru> wrote:
> > Sat, 20 Sep 2014 22:00:37 +0200 ?? Rafa? Mi?ecki <zajec5@gmail.com>:
> >> On 20 September 2014 19:00, Alexander Shiyan <shc_work@mail.ru> wrote:
> >> > Sat, 20 Sep 2014 18:41:22 +0200 ?? Rafa? Mi?ecki <zajec5@gmail.com>:
> >> >> All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs
> >> >> and buttons.
> >> >>
> >> >> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> >> >> ---
> >> >> arch/arm/mach-bcm/Kconfig | 2 ++
> >> >> 1 file changed, 2 insertions(+)
> >> >>
> >> >> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> >> >> index fc93800..d967c98 100644
> >> >> --- a/arch/arm/mach-bcm/Kconfig
> >> >> +++ b/arch/arm/mach-bcm/Kconfig
> >> >> @@ -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.
> >>
> >> 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.
>
> 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.
---
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH V2] ARM: BCM5301X: select GPIOLIB as optional
2014-09-20 16:41 [PATCH] ARM: BCM5301X: select GPIOLIB as optional Rafał Miłecki
2014-09-20 17:00 ` Alexander Shiyan
@ 2014-09-21 14:07 ` Rafał Miłecki
1 sibling, 0 replies; 7+ messages in thread
From: Rafał Miłecki @ 2014-09-21 14:07 UTC (permalink / raw)
To: linux-arm-kernel
All routers (or 99% of them) based on BCM5301X use GPIOs to control LEDs
and buttons.
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
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(+)
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index fc93800..cf230dc3 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -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
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-09-21 14:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-20 16:41 [PATCH] ARM: BCM5301X: select GPIOLIB as optional Rafał Miłecki
2014-09-20 17:00 ` Alexander Shiyan
2014-09-20 20:00 ` Rafał Miłecki
2014-09-20 20:14 ` Alexander Shiyan
2014-09-20 20:23 ` Rafał Miłecki
2014-09-20 20:30 ` Alexander Shiyan
2014-09-21 14:07 ` [PATCH V2] " Rafał Miłecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).