R-Car GPIO fixes
Subsystems (4)
v2 cover R-Car GPIO fixes
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(-)
Signature · 3 lines
Regards, Laurent Pinchart
PATCH v2 1/2 gpio-rcar: Reference core gpio documentation in the DT bindings
Replaced the detailed gpio-ranges documentation with a reference to the code gpio DT bindings, and mention the gpio flags symbolic names.
--- .../devicetree/bindings/gpio/renesas,gpio-rcar.txt | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt +6 -12
@@ -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
Signature · 1 line
1.8.1.5
PATCH v2 2/2 gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
In reply to Laurent PinchartAll 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.
--- drivers/gpio/gpio-rcar.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpio/gpio-rcar.c +2 -6
@@ -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 ) {
Signature · 1 line
1.8.1.5
PATCH v2 2/2 gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
Quoted 6 lines · Laurent Pinchart
All functions and data types used by OF-specific code paths are declared in <
linux/of.h> regardless ofCONFIG_OF. Replace the #ifdefCONFIG_OFguard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize the unused code away.Signed-off-by Laurent Pinchart <[email protected]>
Yours,
Linus Walleij
PATCH v2 2/2 gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
Hi Linus,
Quoted 10 lines · On Wednesday 19 June 2013 21:17:35 Linus Walleij wrote:
Quoted 7 lines · Laurent Pinchart
All functions and data types used by OF-specific code paths are declared in <
linux/of.h> regardless ofCONFIG_OF. Replace the #ifdefCONFIG_OFguard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize the unused code away.Signed-off-by: Laurent Pinchart
<[email protected]>Acked-by Linus Walleij <[email protected]>
Thank you. Can you please take the patch in your tree ?
Signature · 3 lines
Regards, Laurent Pinchart
PATCH v2 2/2 gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
Quoted 7 lines · Laurent Pinchart
Quoted 6 lines · On Wednesday 19 June 2013 21:17:35 Linus Walleij wrote:
Quoted 5 lines · Laurent Pinchart
All functions and data types used by OF-specific code paths are declared in <
linux/of.h> regardless ofCONFIG_OF. Replace the #ifdefCONFIG_OFguard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize the unused code away.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by: Laurent Pinchart
<[email protected]>Acked-by Linus Walleij <[email protected]>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
PATCH v2 2/2 gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
Hi Linus,
Quoted 31 lines · On Thursday 20 June 2013 08:42:23 Linus Walleij wrote:
Quoted 8 lines · Laurent Pinchart
Quoted 7 lines · On Wednesday 19 June 2013 21:17:35 Linus Walleij wrote:
Quoted 6 lines · Laurent Pinchart
All functions and data types used by OF-specific code paths are declared
in <linux/of.h> regardless ofCONFIG_OF. Replace the #ifdefCONFIG_OFguard with a if(IS_ENABLED(CONFIG_OF)) and let the compiler optimize the unused code away.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by: Laurent Pinchart
<[email protected]>Acked-by Linus Walleij <[email protected]>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 #ifdefCONFIG_OFaround 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 #ifdefCONFIG_OFaround 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".
Quoted 2 lines
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 :-)
Signature · 3 lines
Regards, Laurent Pinchart
v2 cover R-Car GPIO fixes
In reply to Laurent PinchartQuoted 13 lines · Laurent Pinchart
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, notIS_CONFIG
Quoted 7 lines
Laurent Pinchart (2):
gpio-rcar: Reference core gpio documentation in the DT bindings
gpio-rcar: Remove #ifdefCONFIG_OFaround 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.