linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] R-Car GPIO fixes
@ 2013-06-18 10:29 Laurent Pinchart
  2013-06-18 10:29 ` [PATCH v2 1/2] gpio-rcar: Reference core gpio documentation in the DT bindings Laurent Pinchart
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-06-18 10:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

Here are two small fixes for the gpio-rcar driver. I would push them through
the GPIO tree if it wasn't for the fact that they're based on gpio-rcar DT
support, scheduled for merge through the ARM SoC tree.

Simon, as these patches are fixes, would it be possible to get them in v3.11
through your tree ?

Changes since v1:

- Fixed 2/2 commit message to mention IS_ENABLED, not IS_CONFIG

Laurent Pinchart (2):
  gpio-rcar: Reference core gpio documentation in the DT bindings
  gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections

 .../devicetree/bindings/gpio/renesas,gpio-rcar.txt     | 18 ++++++------------
 drivers/gpio/gpio-rcar.c                               |  8 ++------
 2 files changed, 8 insertions(+), 18 deletions(-)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/2] gpio-rcar: Reference core gpio documentation in the DT bindings
  2013-06-18 10:29 [PATCH v2 0/2] R-Car GPIO fixes Laurent Pinchart
@ 2013-06-18 10:29 ` Laurent Pinchart
  2013-06-18 10:29 ` [PATCH v2 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections Laurent Pinchart
  2013-06-19 12:40 ` [PATCH v2 0/2] R-Car GPIO fixes Simon Horman
  2 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-06-18 10:29 UTC (permalink / raw)
  To: linux-arm-kernel

Replaced the detailed gpio-ranges documentation with a reference to the
code gpio DT bindings, and mention the gpio flags symbolic names.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .../devicetree/bindings/gpio/renesas,gpio-rcar.txt     | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
index 46d76a0..cb3dc7b 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -16,18 +16,12 @@ Required Properties:
 
   - gpio-controller: Marks the device node as a gpio controller.
   - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
-    cell is used to specify optional parameters as bit flags. Only the GPIO
-    active low flag (bit 0) is currently supported.
-  - gpio-ranges: Range of pins managed by the GPIO controller as a 4-cells
-    tuple using the following syntax.
-
-    <[phandle of the pin controller node]
-     0
-     [index of the first pin]
-     [number of pins]>
-
-Please refer to gpio.txt in this directory for details of the common GPIO
-bindings used by client devices.
+    cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
+    GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
+  - gpio-ranges: Range of pins managed by the GPIO controller.
+
+Please refer to gpio.txt in this directory for details of gpio-ranges property
+and the common GPIO bindings used by client devices.
 
 Example: R8A7779 (R-Car H1) GPIO controller nodes
 
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
  2013-06-18 10:29 [PATCH v2 0/2] R-Car GPIO fixes Laurent Pinchart
  2013-06-18 10:29 ` [PATCH v2 1/2] gpio-rcar: Reference core gpio documentation in the DT bindings Laurent Pinchart
@ 2013-06-18 10:29 ` Laurent Pinchart
  2013-06-19 19:17   ` Linus Walleij
  2013-06-19 12:40 ` [PATCH v2 0/2] R-Car GPIO fixes Simon Horman
  2 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2013-06-18 10:29 UTC (permalink / raw)
  To: linux-arm-kernel

All functions and data types used by OF-specific code paths are declared
in <linux/of.h> regardless of CONFIG_OF. Replace the #ifdef CONFIG_OF
guard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize
the unused code away.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpio/gpio-rcar.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 5a693dd..7fd09ef 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -279,16 +279,13 @@ static struct irq_domain_ops gpio_rcar_irq_domain_ops = {
 static void gpio_rcar_parse_pdata(struct gpio_rcar_priv *p)
 {
 	struct gpio_rcar_config *pdata = p->pdev->dev.platform_data;
-#ifdef CONFIG_OF
 	struct device_node *np = p->pdev->dev.of_node;
 	struct of_phandle_args args;
 	int ret;
-#endif
 
-	if (pdata)
+	if (pdata) {
 		p->config = *pdata;
-#ifdef CONFIG_OF
-	else if (np) {
+	} else if (IS_ENABLED(CONFIG_OF) && np) {
 		ret = of_parse_phandle_with_args(np, "gpio-ranges",
 				"#gpio-range-cells", 0, &args);
 		p->config.number_of_pins = ret == 0 && args.args_count == 3
@@ -296,7 +293,6 @@ static void gpio_rcar_parse_pdata(struct gpio_rcar_priv *p)
 					 : RCAR_MAX_GPIO_PER_BANK;
 		p->config.gpio_base = -1;
 	}
-#endif
 
 	if (p->config.number_of_pins == 0 ||
 	    p->config.number_of_pins > RCAR_MAX_GPIO_PER_BANK) {
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 0/2] R-Car GPIO fixes
  2013-06-18 10:29 [PATCH v2 0/2] R-Car GPIO fixes Laurent Pinchart
  2013-06-18 10:29 ` [PATCH v2 1/2] gpio-rcar: Reference core gpio documentation in the DT bindings Laurent Pinchart
  2013-06-18 10:29 ` [PATCH v2 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections Laurent Pinchart
@ 2013-06-19 12:40 ` Simon Horman
  2 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-06-19 12:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 18, 2013 at 12:29:47PM +0200, Laurent Pinchart wrote:
> Hello,
> 
> Here are two small fixes for the gpio-rcar driver. I would push them through
> the GPIO tree if it wasn't for the fact that they're based on gpio-rcar DT
> support, scheduled for merge through the ARM SoC tree.
> 
> Simon, as these patches are fixes, would it be possible to get them in v3.11
> through your tree ?
> 
> Changes since v1:
> 
> - Fixed 2/2 commit message to mention IS_ENABLED, not IS_CONFIG
> 
> Laurent Pinchart (2):
>   gpio-rcar: Reference core gpio documentation in the DT bindings
>   gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
> 
>  .../devicetree/bindings/gpio/renesas,gpio-rcar.txt     | 18 ++++++------------
>  drivers/gpio/gpio-rcar.c                               |  8 ++------
>  2 files changed, 8 insertions(+), 18 deletions(-)

Thanks, I have queued these up in the gpio-rcar branch.
I will submit them for inclusion in v3.11.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
  2013-06-18 10:29 ` [PATCH v2 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections Laurent Pinchart
@ 2013-06-19 19:17   ` Linus Walleij
  2013-06-19 19:51     ` Laurent Pinchart
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2013-06-19 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 18, 2013 at 12:29 PM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:

> All functions and data types used by OF-specific code paths are declared
> in <linux/of.h> regardless of CONFIG_OF. Replace the #ifdef CONFIG_OF
> guard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize
> the unused code away.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
  2013-06-19 19:17   ` Linus Walleij
@ 2013-06-19 19:51     ` Laurent Pinchart
  2013-06-20  6:42       ` Linus Walleij
  0 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2013-06-19 19:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Linus,

On Wednesday 19 June 2013 21:17:35 Linus Walleij wrote:
> On Tue, Jun 18, 2013 at 12:29 PM, Laurent Pinchart wrote:
> > All functions and data types used by OF-specific code paths are declared
> > in <linux/of.h> regardless of CONFIG_OF. Replace the #ifdef CONFIG_OF
> > guard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize
> > the unused code away.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thank you. Can you please take the patch in your tree ?

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
  2013-06-19 19:51     ` Laurent Pinchart
@ 2013-06-20  6:42       ` Linus Walleij
  2013-06-20  8:04         ` Laurent Pinchart
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2013-06-20  6:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 19, 2013 at 9:51 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wednesday 19 June 2013 21:17:35 Linus Walleij wrote:
>> On Tue, Jun 18, 2013 at 12:29 PM, Laurent Pinchart wrote:
>> > All functions and data types used by OF-specific code paths are declared
>> > in <linux/of.h> regardless of CONFIG_OF. Replace the #ifdef CONFIG_OF
>> > guard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize
>> > the unused code away.
>> >
>> > Signed-off-by: Laurent Pinchart
>> > <laurent.pinchart+renesas@ideasonboard.com>
>>
>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Thank you. Can you please take the patch in your tree ?

No. It does not apply:

]$ git am --signoff rcar-fix.patch
Till?mpar: gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
error: patch misslyckades: drivers/gpio/gpio-rcar.c:279
error: drivers/gpio/gpio-rcar.c: patchen kan inte till?mpas
Patchen misslyckades vid 0001 gpio-rcar: Remove #ifdef CONFIG_OF
around OF-specific sections
En kopia av patchen som misslyckades finns i:
   /home/linus/src/linux-trees/linux-gpio/.git/rebase-apply/patch
N?r du har l?st problemet k?r du "git am --resolved".
Om du vill hoppa ?ver patchen k?r du ist?llet "git am --skip".
F?r att ?terst?lla originalgrenen och avbryta k?r du "git am --abort".


Isn't this RCAR stuff funneled through ARM SoC this merge window?
Then you have to send it to the ARM SoC folks corresponding branch.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
  2013-06-20  6:42       ` Linus Walleij
@ 2013-06-20  8:04         ` Laurent Pinchart
  0 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-06-20  8:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Linus,

On Thursday 20 June 2013 08:42:23 Linus Walleij wrote:
> On Wed, Jun 19, 2013 at 9:51 PM, Laurent Pinchart wrote:
> > On Wednesday 19 June 2013 21:17:35 Linus Walleij wrote:
> >> On Tue, Jun 18, 2013 at 12:29 PM, Laurent Pinchart wrote:
> >> > All functions and data types used by OF-specific code paths are
> >> > declared
> >> > in <linux/of.h> regardless of CONFIG_OF. Replace the #ifdef CONFIG_OF
> >> > guard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize
> >> > the unused code away.
> >> > 
> >> > Signed-off-by: Laurent Pinchart
> >> > <laurent.pinchart+renesas@ideasonboard.com>
> >> 
> >> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> > 
> > Thank you. Can you please take the patch in your tree ?
> 
> No. It does not apply:
> 
> ]$ git am --signoff rcar-fix.patch
> Till?mpar: gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
> error: patch misslyckades: drivers/gpio/gpio-rcar.c:279
> error: drivers/gpio/gpio-rcar.c: patchen kan inte till?mpas
> Patchen misslyckades vid 0001 gpio-rcar: Remove #ifdef CONFIG_OF
> around OF-specific sections
> En kopia av patchen som misslyckades finns i:
>    /home/linus/src/linux-trees/linux-gpio/.git/rebase-apply/patch
> N?r du har l?st problemet k?r du "git am --resolved".
> Om du vill hoppa ?ver patchen k?r du ist?llet "git am --skip".
> F?r att ?terst?lla originalgrenen och avbryta k?r du "git am --abort".
> 
> 
> Isn't this RCAR stuff funneled through ARM SoC this merge window?
> Then you have to send it to the ARM SoC folks corresponding branch.

Oops, my bad. I had mistaken it for one of the pinctrl patches.

/me needs to sleep more :-)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-20  8:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 10:29 [PATCH v2 0/2] R-Car GPIO fixes Laurent Pinchart
2013-06-18 10:29 ` [PATCH v2 1/2] gpio-rcar: Reference core gpio documentation in the DT bindings Laurent Pinchart
2013-06-18 10:29 ` [PATCH v2 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections Laurent Pinchart
2013-06-19 19:17   ` Linus Walleij
2013-06-19 19:51     ` Laurent Pinchart
2013-06-20  6:42       ` Linus Walleij
2013-06-20  8:04         ` Laurent Pinchart
2013-06-19 12:40 ` [PATCH v2 0/2] R-Car GPIO fixes Simon Horman

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).