diff mbox

gpio: ep93xx: move driver to drivers/gpio

Message ID 201105311249.30372.hartleys@visionengravers.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hartley Sweeten May 31, 2011, 7:49 p.m. UTC
The GPIO driver should reside in drivers/gpio.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: Grant Likely <grant.likely@secretlab.ca>

---

diff --git a/arch/arm/mach-ep93xx/gpio.c b/drivers/gpio/gpio-ep93xx.c
similarity index 100%
rename from arch/arm/mach-ep93xx/gpio.c
rename to drivers/gpio/gpio-ep93xx.c

Comments

Grant Likely May 31, 2011, 8:40 p.m. UTC | #1
On Tue, May 31, 2011 at 1:49 PM, H Hartley Sweeten
<hartleys@visionengravers.com> wrote:
> The GPIO driver should reside in drivers/gpio.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <ryan@bluewatersys.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
>
> ---
>
> diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
> index 33ee2c8..6b7c41d 100644
> --- a/arch/arm/mach-ep93xx/Makefile
> +++ b/arch/arm/mach-ep93xx/Makefile
> @@ -1,7 +1,7 @@
>  #
>  # Makefile for the linux kernel.
>  #
> -obj-y                  := core.o clock.o dma-m2p.o gpio.o
> +obj-y                  := core.o clock.o dma-m2p.o
>  obj-m                  :=
>  obj-n                  :=
>  obj-                   :=
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 342d634..7307302 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -86,6 +86,13 @@ config GPIO_IT8761E
>        help
>          Say yes here to support GPIO functionality of IT8761E super I/O chip.
>
> +config GPIO_EP93XX
> +       bool "Cirrus EP93xx GPIO support"
> +       depends on ARCH_EP93XX
> +       default y
> +       help
> +         Say yes here to support the Cirrus EP93xx GPIO peripheral.
> +

Do you really want a user-visible Kconfig symbol here?  If it cannot
be built as a module, then I suspect that for most on-chip gpio
controllers they should just be enabled unconditionally on the SoC's
Kconfig symbol.

g.
Hartley Sweeten May 31, 2011, 10:37 p.m. UTC | #2
On Tuesday, May 31, 2011 1:41 PM, Grant Likely wrote:
> On Tue, May 31, 2011 at 1:49 PM, H Hartley Sweeten wrote:
>> The GPIO driver should reside in drivers/gpio.
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Ryan Mallon <ryan@bluewatersys.com>
>> Cc: Grant Likely <grant.likely@secretlab.ca>
>>
>> ---
>>
>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
>> index 342d634..7307302 100644
>> --- a/drivers/gpio/Kconfig
>> +++ b/drivers/gpio/Kconfig
>> @@ -86,6 +86,13 @@ config GPIO_IT8761E
>>        help
>>          Say yes here to support GPIO functionality of IT8761E super I/O chip.
>>
>> +config GPIO_EP93XX
>> +       bool "Cirrus EP93xx GPIO support"
>> +       depends on ARCH_EP93XX
>> +       default y
>> +       help
>> +         Say yes here to support the Cirrus EP93xx GPIO peripheral.
>> +
>
> Do you really want a user-visible Kconfig symbol here?  If it cannot
> be built as a module, then I suspect that for most on-chip gpio
> controllers they should just be enabled unconditionally on the SoC's
> Kconfig symbol.

Grant,

No, I a user-visible symbol is not needed.  Should I change this to:

+config GPIO_EP93XX
+       bool
+       depends on ARCH_EP93XX
+       default y

Or like the Samsung drivers, without the visibility:

+config GPIO_EP93XX
+       bool
+       depends on ARM
+       default y if ARCH_EP93XX

Also, should the help information remain with a hidden Kconfig symbol?

Thanks,
Hartley
Grant Likely May 31, 2011, 11:28 p.m. UTC | #3
On Tue, May 31, 2011 at 4:37 PM, H Hartley Sweeten
<hartleys@visionengravers.com> wrote:
> On Tuesday, May 31, 2011 1:41 PM, Grant Likely wrote:
>> On Tue, May 31, 2011 at 1:49 PM, H Hartley Sweeten wrote:
>>> The GPIO driver should reside in drivers/gpio.
>>>
>>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>>> Cc: Ryan Mallon <ryan@bluewatersys.com>
>>> Cc: Grant Likely <grant.likely@secretlab.ca>
>>>
>>> ---
>>>
>>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
>>> index 342d634..7307302 100644
>>> --- a/drivers/gpio/Kconfig
>>> +++ b/drivers/gpio/Kconfig
>>> @@ -86,6 +86,13 @@ config GPIO_IT8761E
>>>        help
>>>          Say yes here to support GPIO functionality of IT8761E super I/O chip.
>>>
>>> +config GPIO_EP93XX
>>> +       bool "Cirrus EP93xx GPIO support"
>>> +       depends on ARCH_EP93XX
>>> +       default y
>>> +       help
>>> +         Say yes here to support the Cirrus EP93xx GPIO peripheral.
>>> +
>>
>> Do you really want a user-visible Kconfig symbol here?  If it cannot
>> be built as a module, then I suspect that for most on-chip gpio
>> controllers they should just be enabled unconditionally on the SoC's
>> Kconfig symbol.
>
> Grant,
>
> No, I a user-visible symbol is not needed.  Should I change this to:
>
> +config GPIO_EP93XX
> +       bool
> +       depends on ARCH_EP93XX
> +       default y
>
> Or like the Samsung drivers, without the visibility:
>
> +config GPIO_EP93XX
> +       bool
> +       depends on ARM
> +       default y if ARCH_EP93XX

I like the former.

> Also, should the help information remain with a hidden Kconfig symbol?

The help text is pretty vanilla.  Drop it.
Russell King - ARM Linux June 1, 2011, 8:26 a.m. UTC | #4
On Tue, May 31, 2011 at 05:28:26PM -0600, Grant Likely wrote:
> On Tue, May 31, 2011 at 4:37 PM, H Hartley Sweeten
> <hartleys@visionengravers.com> wrote:
> > On Tuesday, May 31, 2011 1:41 PM, Grant Likely wrote:
> >> On Tue, May 31, 2011 at 1:49 PM, H Hartley Sweeten wrote:
> >>> The GPIO driver should reside in drivers/gpio.
> >>>
> >>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> >>> Cc: Ryan Mallon <ryan@bluewatersys.com>
> >>> Cc: Grant Likely <grant.likely@secretlab.ca>
> >>>
> >>> ---
> >>>
> >>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> >>> index 342d634..7307302 100644
> >>> --- a/drivers/gpio/Kconfig
> >>> +++ b/drivers/gpio/Kconfig
> >>> @@ -86,6 +86,13 @@ config GPIO_IT8761E
> >>>        help
> >>>          Say yes here to support GPIO functionality of IT8761E super I/O chip.
> >>>
> >>> +config GPIO_EP93XX
> >>> +       bool "Cirrus EP93xx GPIO support"
> >>> +       depends on ARCH_EP93XX
> >>> +       default y
> >>> +       help
> >>> +         Say yes here to support the Cirrus EP93xx GPIO peripheral.
> >>> +
> >>
> >> Do you really want a user-visible Kconfig symbol here?  If it cannot
> >> be built as a module, then I suspect that for most on-chip gpio
> >> controllers they should just be enabled unconditionally on the SoC's
> >> Kconfig symbol.
> >
> > Grant,
> >
> > No, I a user-visible symbol is not needed.  Should I change this to:
> >
> > +config GPIO_EP93XX
> > +       bool
> > +       depends on ARCH_EP93XX
> > +       default y
> >
> > Or like the Samsung drivers, without the visibility:
> >
> > +config GPIO_EP93XX
> > +       bool
> > +       depends on ARM
> > +       default y if ARCH_EP93XX
> 
> I like the former.

Even better is:

config GPIO_EP93XX
	def_bool y
	depends on ARCH_EP93XX
Grant Likely June 1, 2011, 4:46 p.m. UTC | #5
On Wed, Jun 1, 2011 at 2:26 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Tue, May 31, 2011 at 05:28:26PM -0600, Grant Likely wrote:
>> > [...]Should I change this to:
>> >
>> > +config GPIO_EP93XX
>> > +       bool
>> > +       depends on ARCH_EP93XX
>> > +       default y
>> >
>> > Or like the Samsung drivers, without the visibility:
>> >
>> > +config GPIO_EP93XX
>> > +       bool
>> > +       depends on ARM
>> > +       default y if ARCH_EP93XX
>>
>> I like the former.
>
> Even better is:
>
> config GPIO_EP93XX
>        def_bool y
>        depends on ARCH_EP93XX

Yup.

g.
diff mbox

Patch

diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index 33ee2c8..6b7c41d 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -1,7 +1,7 @@ 
 #
 # Makefile for the linux kernel.
 #
-obj-y			:= core.o clock.o dma-m2p.o gpio.o
+obj-y			:= core.o clock.o dma-m2p.o
 obj-m			:=
 obj-n			:=
 obj-			:=
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 342d634..7307302 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -86,6 +86,13 @@  config GPIO_IT8761E
 	help
 	  Say yes here to support GPIO functionality of IT8761E super I/O chip.
 
+config GPIO_EP93XX
+	bool "Cirrus EP93xx GPIO support"
+	depends on ARCH_EP93XX
+	default y
+	help
+	  Say yes here to support the Cirrus EP93xx GPIO peripheral.
+
 config GPIO_EXYNOS4
 	bool "Samsung Exynos4 GPIO library support"
 	default y if CPU_EXYNOS4210
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 4ac7cb3..c8faabe 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -8,6 +8,7 @@  obj-$(CONFIG_GPIO_ADP5520)	+= adp5520-gpio.o
 obj-$(CONFIG_GPIO_ADP5588)	+= adp5588-gpio.o
 obj-$(CONFIG_GPIO_BASIC_MMIO_CORE)	+= basic_mmio_gpio.o
 obj-$(CONFIG_GPIO_BASIC_MMIO)	+= basic_mmio_gpio.o
+obj-$(CONFIG_GPIO_EP93XX)	+= gpio-ep93xx.o
 obj-$(CONFIG_GPIO_EXYNOS4)	+= gpio-exynos4.o
 obj-$(CONFIG_GPIO_I801)		+= gpio-i801.o
 obj-$(CONFIG_GPIO_PLAT_SAMSUNG)	+= gpio-plat-samsung.o