* [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone
@ 2013-11-21 15:34 Grygorii Strashko
2013-11-21 15:34 ` [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO Grygorii Strashko
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Grygorii Strashko @ 2013-11-21 15:34 UTC (permalink / raw)
To: Linus Walleij, linux-gpio
Cc: prabhakar.csengg, nsekhar, Santosh Shilimkar, linux-kernel,
Grygorii Strashko
This series is a preparation step for reusing Davinci GPIO driver
for Keystone SoCs.
And it's been created in order to break the strict dependency of
Davinci GPIO driver from Davinci platform code.
Based on patch:
http://www.spinics.net/lists/kernel/msg1632405.html
Grygorii Strashko (2):
gpio: davinci: get rid of DAVINCI_N_GPIO
gpio: introduce GPIO_DAVINCI kconfig option
drivers/gpio/Kconfig | 7 +++++++
drivers/gpio/Makefile | 2 +-
drivers/gpio/gpio-davinci.c | 4 ++--
3 files changed, 10 insertions(+), 3 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO
2013-11-21 15:34 [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone Grygorii Strashko
@ 2013-11-21 15:34 ` Grygorii Strashko
2013-11-26 10:27 ` Prabhakar Lad
2013-11-29 8:33 ` Linus Walleij
2013-11-21 15:34 ` [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option Grygorii Strashko
2013-11-29 15:41 ` [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone Santosh Shilimkar
2 siblings, 2 replies; 10+ messages in thread
From: Grygorii Strashko @ 2013-11-21 15:34 UTC (permalink / raw)
To: Linus Walleij, linux-gpio
Cc: prabhakar.csengg, nsekhar, Santosh Shilimkar, linux-kernel,
Grygorii Strashko
Since Davinci GPIO driver is moved to support gpiolib it has to use
ARCH_NR_GPIOS (can be configured using CONFIG_ARCH_NR_GPIO Kconfig
option) configuration instead of any mach/platform specific options.
Hence, replace private DAVINCI_N_GPIO with common ARCH_NR_GPIOS. This is
safe because default value for ARCH_NR_GPIOS=256 and maximum number of
supported GPIOs for Davinci is DAVINCI_N_GPIO=144.
More over, this is one of steps to re-use Davinci GPIO driver by other
mach/platform.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
drivers/gpio/gpio-davinci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 1f33fcd..944c819 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -160,8 +160,8 @@ static int davinci_gpio_probe(struct platform_device *pdev)
return -EINVAL;
}
- if (WARN_ON(DAVINCI_N_GPIO < ngpio))
- ngpio = DAVINCI_N_GPIO;
+ if (WARN_ON(ARCH_NR_GPIOS < ngpio))
+ ngpio = ARCH_NR_GPIOS;
chips = devm_kzalloc(dev,
ngpio * sizeof(struct davinci_gpio_controller),
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO
2013-11-21 15:34 ` [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO Grygorii Strashko
@ 2013-11-26 10:27 ` Prabhakar Lad
2013-11-29 8:33 ` Linus Walleij
1 sibling, 0 replies; 10+ messages in thread
From: Prabhakar Lad @ 2013-11-26 10:27 UTC (permalink / raw)
To: Grygorii Strashko
Cc: Linus Walleij, linux-gpio@vger.kernel.org, Sekhar Nori,
Santosh Shilimkar, LKML
On Thu, Nov 21, 2013 at 9:04 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> Since Davinci GPIO driver is moved to support gpiolib it has to use
> ARCH_NR_GPIOS (can be configured using CONFIG_ARCH_NR_GPIO Kconfig
> option) configuration instead of any mach/platform specific options.
>
> Hence, replace private DAVINCI_N_GPIO with common ARCH_NR_GPIOS. This is
> safe because default value for ARCH_NR_GPIOS=256 and maximum number of
> supported GPIOs for Davinci is DAVINCI_N_GPIO=144.
>
> More over, this is one of steps to re-use Davinci GPIO driver by other
> mach/platform.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Regards,
--Prabhakar Lad
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO
2013-11-21 15:34 ` [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO Grygorii Strashko
2013-11-26 10:27 ` Prabhakar Lad
@ 2013-11-29 8:33 ` Linus Walleij
2013-12-15 11:57 ` Sekhar Nori
1 sibling, 1 reply; 10+ messages in thread
From: Linus Walleij @ 2013-11-29 8:33 UTC (permalink / raw)
To: Grygorii Strashko, Nori, Sekhar
Cc: linux-gpio@vger.kernel.org, Prabhakar Lad, Santosh Shilimkar,
linux-kernel@vger.kernel.org
On Thu, Nov 21, 2013 at 4:34 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> Since Davinci GPIO driver is moved to support gpiolib it has to use
> ARCH_NR_GPIOS (can be configured using CONFIG_ARCH_NR_GPIO Kconfig
> option) configuration instead of any mach/platform specific options.
>
> Hence, replace private DAVINCI_N_GPIO with common ARCH_NR_GPIOS. This is
> safe because default value for ARCH_NR_GPIOS=256 and maximum number of
> supported GPIOs for Davinci is DAVINCI_N_GPIO=144.
>
> More over, this is one of steps to re-use Davinci GPIO driver by other
> mach/platform.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Now we have a handful of people patching DaVinci GPIOs...
Sekhar: can you coordinate the different DaVinci patches? If you want me
to take a complete set of stuff at the end of the day you can give me a
pull request for inclusion into the GPIO tree.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO
2013-11-29 8:33 ` Linus Walleij
@ 2013-12-15 11:57 ` Sekhar Nori
0 siblings, 0 replies; 10+ messages in thread
From: Sekhar Nori @ 2013-12-15 11:57 UTC (permalink / raw)
To: Linus Walleij, Grygorii Strashko
Cc: linux-gpio@vger.kernel.org, Prabhakar Lad, Santosh Shilimkar,
linux-kernel@vger.kernel.org
On Friday 29 November 2013 02:03 PM, Linus Walleij wrote:
> On Thu, Nov 21, 2013 at 4:34 PM, Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
>
>> Since Davinci GPIO driver is moved to support gpiolib it has to use
>> ARCH_NR_GPIOS (can be configured using CONFIG_ARCH_NR_GPIO Kconfig
>> option) configuration instead of any mach/platform specific options.
>>
>> Hence, replace private DAVINCI_N_GPIO with common ARCH_NR_GPIOS. This is
>> safe because default value for ARCH_NR_GPIOS=256 and maximum number of
>> supported GPIOs for Davinci is DAVINCI_N_GPIO=144.
>>
>> More over, this is one of steps to re-use Davinci GPIO driver by other
>> mach/platform.
>>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Added to v3.14/gpio of my k.org tree with Prabhakar's, Santosh's and
your acks.
>
> Now we have a handful of people patching DaVinci GPIOs...
>
> Sekhar: can you coordinate the different DaVinci patches? If you want me
> to take a complete set of stuff at the end of the day you can give me a
> pull request for inclusion into the GPIO tree.
Will do.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option
2013-11-21 15:34 [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone Grygorii Strashko
2013-11-21 15:34 ` [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO Grygorii Strashko
@ 2013-11-21 15:34 ` Grygorii Strashko
2013-11-26 10:29 ` Prabhakar Lad
2013-11-29 8:35 ` Linus Walleij
2013-11-29 15:41 ` [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone Santosh Shilimkar
2 siblings, 2 replies; 10+ messages in thread
From: Grygorii Strashko @ 2013-11-21 15:34 UTC (permalink / raw)
To: Linus Walleij, linux-gpio
Cc: prabhakar.csengg, nsekhar, Santosh Shilimkar, linux-kernel,
Grygorii Strashko
The compatible to Davinci GPIO HW block is used by other TI SoCs, like
Keystone, where GPIO support is declared as optional.
Hence, introduce GPIO_DAVINCI Kconfig option which will allow to enable
Davinci GPIO driver for Keystone SoCs when needed. At same time, kept
Davinci GPIO driver enabled for Davinci SoCs by default.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
drivers/gpio/Kconfig | 7 +++++++
drivers/gpio/Makefile | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 0f04444..7c75f5a 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -115,6 +115,13 @@ config GPIO_CLPS711X
help
Say yes here to support GPIO on CLPS711X SoCs.
+config GPIO_DAVINCI
+ bool "TI Davinci/Keystone GPIO support"
+ default y if ARCH_DAVINCI
+ depends on ARM && (ARCH_DAVINCI || ARCH_KEYSTONE)
+ help
+ Say yes here to enable GPIO support for TI Davinci/Keystone SoCs.
+
config GPIO_GENERIC_PLATFORM
tristate "Generic memory-mapped GPIO controller support (MMIO platform device)"
select GPIO_GENERIC
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 7971e36..28a0ffc 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -22,7 +22,7 @@ obj-$(CONFIG_GPIO_CLPS711X) += gpio-clps711x.o
obj-$(CONFIG_GPIO_CS5535) += gpio-cs5535.o
obj-$(CONFIG_GPIO_DA9052) += gpio-da9052.o
obj-$(CONFIG_GPIO_DA9055) += gpio-da9055.o
-obj-$(CONFIG_ARCH_DAVINCI) += gpio-davinci.o
+obj-$(CONFIG_GPIO_DAVINCI) += gpio-davinci.o
obj-$(CONFIG_GPIO_EM) += gpio-em.o
obj-$(CONFIG_GPIO_EP93XX) += gpio-ep93xx.o
obj-$(CONFIG_GPIO_F7188X) += gpio-f7188x.o
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option
2013-11-21 15:34 ` [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option Grygorii Strashko
@ 2013-11-26 10:29 ` Prabhakar Lad
2013-11-29 8:35 ` Linus Walleij
1 sibling, 0 replies; 10+ messages in thread
From: Prabhakar Lad @ 2013-11-26 10:29 UTC (permalink / raw)
To: Grygorii Strashko
Cc: Linus Walleij, linux-gpio@vger.kernel.org, Sekhar Nori,
Santosh Shilimkar, LKML
On Thu, Nov 21, 2013 at 9:04 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> The compatible to Davinci GPIO HW block is used by other TI SoCs, like
> Keystone, where GPIO support is declared as optional.
>
> Hence, introduce GPIO_DAVINCI Kconfig option which will allow to enable
> Davinci GPIO driver for Keystone SoCs when needed. At same time, kept
> Davinci GPIO driver enabled for Davinci SoCs by default.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Regards,
--Prabhakar Lad
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option
2013-11-21 15:34 ` [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option Grygorii Strashko
2013-11-26 10:29 ` Prabhakar Lad
@ 2013-11-29 8:35 ` Linus Walleij
2013-12-15 12:04 ` Sekhar Nori
1 sibling, 1 reply; 10+ messages in thread
From: Linus Walleij @ 2013-11-29 8:35 UTC (permalink / raw)
To: Grygorii Strashko, Nori, Sekhar
Cc: linux-gpio@vger.kernel.org, Prabhakar Lad, Santosh Shilimkar,
linux-kernel@vger.kernel.org
On Thu, Nov 21, 2013 at 4:34 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> The compatible to Davinci GPIO HW block is used by other TI SoCs, like
> Keystone, where GPIO support is declared as optional.
>
> Hence, introduce GPIO_DAVINCI Kconfig option which will allow to enable
> Davinci GPIO driver for Keystone SoCs when needed. At same time, kept
> Davinci GPIO driver enabled for Davinci SoCs by default.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Sekhar, same comment here.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option
2013-11-29 8:35 ` Linus Walleij
@ 2013-12-15 12:04 ` Sekhar Nori
0 siblings, 0 replies; 10+ messages in thread
From: Sekhar Nori @ 2013-12-15 12:04 UTC (permalink / raw)
To: Linus Walleij, Grygorii Strashko
Cc: linux-gpio@vger.kernel.org, Prabhakar Lad, Santosh Shilimkar,
linux-kernel@vger.kernel.org
On Friday 29 November 2013 02:05 PM, Linus Walleij wrote:
> On Thu, Nov 21, 2013 at 4:34 PM, Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
>
>> The compatible to Davinci GPIO HW block is used by other TI SoCs, like
>> Keystone, where GPIO support is declared as optional.
>>
>> Hence, introduce GPIO_DAVINCI Kconfig option which will allow to enable
>> Davinci GPIO driver for Keystone SoCs when needed. At same time, kept
>> Davinci GPIO driver enabled for Davinci SoCs by default.
>>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Sekhar, same comment here.
Queuing this with your's, Santosh's and Prabhakar's acks.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone
2013-11-21 15:34 [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone Grygorii Strashko
2013-11-21 15:34 ` [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO Grygorii Strashko
2013-11-21 15:34 ` [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option Grygorii Strashko
@ 2013-11-29 15:41 ` Santosh Shilimkar
2 siblings, 0 replies; 10+ messages in thread
From: Santosh Shilimkar @ 2013-11-29 15:41 UTC (permalink / raw)
To: Grygorii Strashko
Cc: Linus Walleij, linux-gpio, prabhakar.csengg, nsekhar,
linux-kernel
On Thursday 21 November 2013 10:34 AM, Grygorii Strashko wrote:
> This series is a preparation step for reusing Davinci GPIO driver
> for Keystone SoCs.
> And it's been created in order to break the strict dependency of
> Davinci GPIO driver from Davinci platform code.
>
> Based on patch:
> http://www.spinics.net/lists/kernel/msg1632405.html
>
> Grygorii Strashko (2):
> gpio: davinci: get rid of DAVINCI_N_GPIO
> gpio: introduce GPIO_DAVINCI kconfig option
>
> drivers/gpio/Kconfig | 7 +++++++
> drivers/gpio/Makefile | 2 +-
> drivers/gpio/gpio-davinci.c | 4 ++--
> 3 files changed, 10 insertions(+), 3 deletions(-)
>
Thanks Grygorii and clean-up is inline as discussed off-list.
FWIW,
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-12-15 12:05 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 15:34 [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone Grygorii Strashko
2013-11-21 15:34 ` [PATCH 1/2] gpio: davinci: get rid of DAVINCI_N_GPIO Grygorii Strashko
2013-11-26 10:27 ` Prabhakar Lad
2013-11-29 8:33 ` Linus Walleij
2013-12-15 11:57 ` Sekhar Nori
2013-11-21 15:34 ` [PATCH 2/2] gpio: introduce GPIO_DAVINCI kconfig option Grygorii Strashko
2013-11-26 10:29 ` Prabhakar Lad
2013-11-29 8:35 ` Linus Walleij
2013-12-15 12:04 ` Sekhar Nori
2013-11-29 15:41 ` [PATCH 0/2] gpio: davinci: preparation fixes and updates to reuse it for Keystone Santosh Shilimkar
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).