* [PATCH 0/2] legacy gpio phaseout (V) ...
@ 2008-12-03 7:37 Jarkko Nikula
2008-12-03 7:37 ` [PATCH 1/2] ARM: OMAP: SX1: Switch to gpio_request calls (OMAP and mainline) Jarkko Nikula
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Jarkko Nikula @ 2008-12-03 7:37 UTC (permalink / raw)
To: linux-omap
Hi
With these two patches gpiolib conversion in mainline is almost complete when
applied on top of Tony's Omap gpio update set for 2.6.29. Only board-apollon.c
is remain in mainline but it is differentiated quite much from linux-omap so
I'm going to send my next set against linux-omap only.
Note, these versions don't change mach/gpio.h include statement to
linux/gpio.h due merge conflicts in mainline. SX1 seems to lack some
gpio-swich related patch and omap2 onenand is getting some include fixes
from mtd tree.
--
Jarkko
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] ARM: OMAP: SX1: Switch to gpio_request calls (OMAP and mainline)
2008-12-03 7:37 [PATCH 0/2] legacy gpio phaseout (V) Jarkko Nikula
@ 2008-12-03 7:37 ` Jarkko Nikula
2008-12-03 7:37 ` [PATCH 2/2] OneNAND: OMAP2: Switch to gpio_request/free " Jarkko Nikula
2009-01-07 15:56 ` [PATCH 0/2] legacy gpio phaseout (V) Tony Lindgren
2 siblings, 0 replies; 9+ messages in thread
From: Jarkko Nikula @ 2008-12-03 7:37 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
arch/arm/mach-omap1/board-sx1.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 786c6a0..bfafba2 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -424,9 +424,9 @@ static void __init omap_sx1_init(void)
/* turn on USB power */
/* sx1_setusbpower(1); cant do it here because i2c is not ready */
- omap_request_gpio(1); /* A_IRDA_OFF */
- omap_request_gpio(11); /* A_SWITCH */
- omap_request_gpio(15); /* A_USB_ON */
+ gpio_request(1, "A_IRDA_OFF");
+ gpio_request(11, "A_SWITCH");
+ gpio_request(15, "A_USB_ON");
gpio_direction_output(1, 1); /*A_IRDA_OFF = 1 */
gpio_direction_output(11, 0); /*A_SWITCH = 0 */
gpio_direction_output(15, 0); /*A_USB_ON = 0 */
--
1.5.6.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] OneNAND: OMAP2: Switch to gpio_request/free calls (OMAP and mainline)
2008-12-03 7:37 [PATCH 0/2] legacy gpio phaseout (V) Jarkko Nikula
2008-12-03 7:37 ` [PATCH 1/2] ARM: OMAP: SX1: Switch to gpio_request calls (OMAP and mainline) Jarkko Nikula
@ 2008-12-03 7:37 ` Jarkko Nikula
2008-12-03 7:41 ` Jarkko Nikula
2008-12-05 12:24 ` Adrian Hunter
2009-01-07 15:56 ` [PATCH 0/2] legacy gpio phaseout (V) Tony Lindgren
2 siblings, 2 replies; 9+ messages in thread
From: Jarkko Nikula @ 2008-12-03 7:37 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
drivers/mtd/onenand/omap2.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 1298563..9ae49b1 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -630,7 +630,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
}
if (c->gpio_irq) {
- if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
+ if ((r = gpio_request(c->gpio_irq, "OneNAND irq")) < 0) {
dev_err(&pdev->dev, "Failed to request GPIO%d for "
"OneNAND\n", c->gpio_irq);
goto err_iounmap;
@@ -727,7 +727,7 @@ err_release_dma:
free_irq(gpio_to_irq(c->gpio_irq), c);
err_release_gpio:
if (c->gpio_irq)
- omap_free_gpio(c->gpio_irq);
+ gpio_free(c->gpio_irq);
err_iounmap:
iounmap(c->onenand.base);
err_release_mem_region:
@@ -762,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
if (c->gpio_irq) {
free_irq(gpio_to_irq(c->gpio_irq), c);
- omap_free_gpio(c->gpio_irq);
+ gpio_free(c->gpio_irq);
}
iounmap(c->onenand.base);
release_mem_region(c->phys_base, ONENAND_IO_SIZE);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] OneNAND: OMAP2: Switch to gpio_request/free calls (OMAP and mainline)
2008-12-03 7:37 ` [PATCH 2/2] OneNAND: OMAP2: Switch to gpio_request/free " Jarkko Nikula
@ 2008-12-03 7:41 ` Jarkko Nikula
2008-12-05 12:24 ` Adrian Hunter
1 sibling, 0 replies; 9+ messages in thread
From: Jarkko Nikula @ 2008-12-03 7:41 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap, Adrian Hunter
On Wed, 3 Dec 2008 09:37:24 +0200
Jarkko Nikula <jarkko.nikula@nokia.com> wrote:
> Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
> ---
> drivers/mtd/onenand/omap2.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
Grr, I forgot to add Adrian into cc list.
> diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> index 1298563..9ae49b1 100644
> --- a/drivers/mtd/onenand/omap2.c
> +++ b/drivers/mtd/onenand/omap2.c
> @@ -630,7 +630,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
> }
>
> if (c->gpio_irq) {
> - if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> + if ((r = gpio_request(c->gpio_irq, "OneNAND irq")) < 0) {
> dev_err(&pdev->dev, "Failed to request GPIO%d for "
> "OneNAND\n", c->gpio_irq);
> goto err_iounmap;
> @@ -727,7 +727,7 @@ err_release_dma:
> free_irq(gpio_to_irq(c->gpio_irq), c);
> err_release_gpio:
> if (c->gpio_irq)
> - omap_free_gpio(c->gpio_irq);
> + gpio_free(c->gpio_irq);
> err_iounmap:
> iounmap(c->onenand.base);
> err_release_mem_region:
> @@ -762,7 +762,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
> platform_set_drvdata(pdev, NULL);
> if (c->gpio_irq) {
> free_irq(gpio_to_irq(c->gpio_irq), c);
> - omap_free_gpio(c->gpio_irq);
> + gpio_free(c->gpio_irq);
> }
> iounmap(c->onenand.base);
> release_mem_region(c->phys_base, ONENAND_IO_SIZE);
> --
> 1.5.6.5
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] OneNAND: OMAP2: Switch to generic gpio calls
2008-12-03 7:37 ` [PATCH 2/2] OneNAND: OMAP2: Switch to gpio_request/free " Jarkko Nikula
@ 2008-12-05 12:24 ` Adrian Hunter
2008-12-05 12:24 ` Adrian Hunter
1 sibling, 0 replies; 9+ messages in thread
From: Adrian Hunter @ 2008-12-05 12:24 UTC (permalink / raw)
To: David Woodhouse
Cc: Jarkko Nikula, linux-omap Mailing List, linux-mtd Mailing List
From: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
---
drivers/mtd/onenand/omap2.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index a7e4d98..c260e2d 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
INIT_COMPLETION(c->irq_done);
if (c->gpio_irq) {
- result = omap_get_gpio_datain(c->gpio_irq);
+ result = gpio_get_value(c->gpio_irq);
if (result == -1) {
ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
intr = read_reg(c, ONENAND_REG_INTERRUPT);
@@ -629,14 +629,14 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
}
if (c->gpio_irq) {
- if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
+ if ((r = gpio_request(c->gpio_irq, "OneNAND irq")) < 0) {
dev_err(&pdev->dev, "Failed to request GPIO%d for "
"OneNAND\n", c->gpio_irq);
goto err_iounmap;
}
- omap_set_gpio_direction(c->gpio_irq, 1);
+ gpio_direction_input(c->gpio_irq);
- if ((r = request_irq(OMAP_GPIO_IRQ(c->gpio_irq),
+ if ((r = request_irq(gpio_to_irq(c->gpio_irq),
omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
pdev->dev.driver->name, c)) < 0)
goto err_release_gpio;
@@ -723,10 +723,10 @@ err_release_dma:
if (c->dma_channel != -1)
omap_free_dma(c->dma_channel);
if (c->gpio_irq)
- free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c);
+ free_irq(gpio_to_irq(c->gpio_irq), c);
err_release_gpio:
if (c->gpio_irq)
- omap_free_gpio(c->gpio_irq);
+ gpio_free(c->gpio_irq);
err_iounmap:
iounmap(c->onenand.base);
err_release_mem_region:
@@ -760,8 +760,8 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
omap2_onenand_shutdown(pdev);
platform_set_drvdata(pdev, NULL);
if (c->gpio_irq) {
- free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c);
- omap_free_gpio(c->gpio_irq);
+ free_irq(gpio_to_irq(c->gpio_irq), c);
+ gpio_free(c->gpio_irq);
}
iounmap(c->onenand.base);
release_mem_region(c->phys_base, ONENAND_IO_SIZE);
--
1.5.4.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] OneNAND: OMAP2: Switch to generic gpio calls
@ 2008-12-05 12:24 ` Adrian Hunter
0 siblings, 0 replies; 9+ messages in thread
From: Adrian Hunter @ 2008-12-05 12:24 UTC (permalink / raw)
To: David Woodhouse
Cc: linux-omap Mailing List, linux-mtd Mailing List, Jarkko Nikula
From: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
---
drivers/mtd/onenand/omap2.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index a7e4d98..c260e2d 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
INIT_COMPLETION(c->irq_done);
if (c->gpio_irq) {
- result = omap_get_gpio_datain(c->gpio_irq);
+ result = gpio_get_value(c->gpio_irq);
if (result == -1) {
ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
intr = read_reg(c, ONENAND_REG_INTERRUPT);
@@ -629,14 +629,14 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
}
if (c->gpio_irq) {
- if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
+ if ((r = gpio_request(c->gpio_irq, "OneNAND irq")) < 0) {
dev_err(&pdev->dev, "Failed to request GPIO%d for "
"OneNAND\n", c->gpio_irq);
goto err_iounmap;
}
- omap_set_gpio_direction(c->gpio_irq, 1);
+ gpio_direction_input(c->gpio_irq);
- if ((r = request_irq(OMAP_GPIO_IRQ(c->gpio_irq),
+ if ((r = request_irq(gpio_to_irq(c->gpio_irq),
omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
pdev->dev.driver->name, c)) < 0)
goto err_release_gpio;
@@ -723,10 +723,10 @@ err_release_dma:
if (c->dma_channel != -1)
omap_free_dma(c->dma_channel);
if (c->gpio_irq)
- free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c);
+ free_irq(gpio_to_irq(c->gpio_irq), c);
err_release_gpio:
if (c->gpio_irq)
- omap_free_gpio(c->gpio_irq);
+ gpio_free(c->gpio_irq);
err_iounmap:
iounmap(c->onenand.base);
err_release_mem_region:
@@ -760,8 +760,8 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
omap2_onenand_shutdown(pdev);
platform_set_drvdata(pdev, NULL);
if (c->gpio_irq) {
- free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c);
- omap_free_gpio(c->gpio_irq);
+ free_irq(gpio_to_irq(c->gpio_irq), c);
+ gpio_free(c->gpio_irq);
}
iounmap(c->onenand.base);
release_mem_region(c->phys_base, ONENAND_IO_SIZE);
--
1.5.4.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] OneNAND: OMAP2: Switch to generic gpio calls
2008-12-05 12:24 ` Adrian Hunter
@ 2008-12-05 18:14 ` David Brownell
-1 siblings, 0 replies; 9+ messages in thread
From: David Brownell @ 2008-12-05 18:14 UTC (permalink / raw)
To: Adrian Hunter
Cc: linux-mtd Mailing List, linux-omap Mailing List, David Woodhouse,
Jarkko Nikula
On Friday 05 December 2008, Adrian Hunter wrote:
> - if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> + if ((r = gpio_request(c->gpio_irq, "OneNAND irq")) < 0) {
Worth noting that this depends on the OMAP patches which
make those calls be equivalent. Those patches are going
into 2.6.29-early via the ARM tree, as I recall; getting
the merge order wrong would break bisectability -- but
not buildability.
- Dave
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] OneNAND: OMAP2: Switch to generic gpio calls
@ 2008-12-05 18:14 ` David Brownell
0 siblings, 0 replies; 9+ messages in thread
From: David Brownell @ 2008-12-05 18:14 UTC (permalink / raw)
To: Adrian Hunter
Cc: David Woodhouse, linux-omap Mailing List, linux-mtd Mailing List,
Jarkko Nikula
On Friday 05 December 2008, Adrian Hunter wrote:
> - if ((r = omap_request_gpio(c->gpio_irq)) < 0) {
> + if ((r = gpio_request(c->gpio_irq, "OneNAND irq")) < 0) {
Worth noting that this depends on the OMAP patches which
make those calls be equivalent. Those patches are going
into 2.6.29-early via the ARM tree, as I recall; getting
the merge order wrong would break bisectability -- but
not buildability.
- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] legacy gpio phaseout (V) ...
2008-12-03 7:37 [PATCH 0/2] legacy gpio phaseout (V) Jarkko Nikula
2008-12-03 7:37 ` [PATCH 1/2] ARM: OMAP: SX1: Switch to gpio_request calls (OMAP and mainline) Jarkko Nikula
2008-12-03 7:37 ` [PATCH 2/2] OneNAND: OMAP2: Switch to gpio_request/free " Jarkko Nikula
@ 2009-01-07 15:56 ` Tony Lindgren
2 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-01-07 15:56 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap
* Jarkko Nikula <jarkko.nikula@nokia.com> [081203 09:38]:
> Hi
>
> With these two patches gpiolib conversion in mainline is almost complete when
> applied on top of Tony's Omap gpio update set for 2.6.29. Only board-apollon.c
> is remain in mainline but it is differentiated quite much from linux-omap so
> I'm going to send my next set against linux-omap only.
>
> Note, these versions don't change mach/gpio.h include statement to
> linux/gpio.h due merge conflicts in mainline. SX1 seems to lack some
> gpio-swich related patch and omap2 onenand is getting some include fixes
> from mtd tree.
I've finally pushed these as one patch and also removed the remaining
calls. Also on their way to mainline hopefully within next few days.
Regards,
Tony
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-01-07 15:56 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 7:37 [PATCH 0/2] legacy gpio phaseout (V) Jarkko Nikula
2008-12-03 7:37 ` [PATCH 1/2] ARM: OMAP: SX1: Switch to gpio_request calls (OMAP and mainline) Jarkko Nikula
2008-12-03 7:37 ` [PATCH 2/2] OneNAND: OMAP2: Switch to gpio_request/free " Jarkko Nikula
2008-12-03 7:41 ` Jarkko Nikula
2008-12-05 12:24 ` [PATCH] OneNAND: OMAP2: Switch to generic gpio calls Adrian Hunter
2008-12-05 12:24 ` Adrian Hunter
2008-12-05 18:14 ` David Brownell
2008-12-05 18:14 ` David Brownell
2009-01-07 15:56 ` [PATCH 0/2] legacy gpio phaseout (V) Tony Lindgren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.