* [GIT PULL 0/2] Renesas ARM based SoC GPIO R-Car updates for v3.11 #2
@ 2013-06-20 13:09 ` Simon Horman
0 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2013-06-20 13:09 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Arnd,
this pull request is based on renesas-gpio-rcar-for-v3.11,
which you have already pulled. That tag adds the code and
documentation which is updated by the patches in this pull-request.
The following changes since commit 159f8a0209aff155af7f6fcdedd4a4484dd19c23:
gpio-rcar: Add DT support (2013-06-12 21:48:09 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-gpio-rcar2-for-v3.11
for you to fetch changes up to e305062e94719ef543ae936dd56501b5a36406c6:
gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections (2013-06-19 21:38:38 +0900)
----------------------------------------------------------------
Second Round of Renesas ARM based SoC GPIO R-Car updates for v3.11
Documentation enhancement and code cleanup by Laurent Pinchart.
----------------------------------------------------------------
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(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [GIT PULL 0/2] Renesas ARM based SoC GPIO R-Car updates for v3.11 #2
@ 2013-06-20 13:09 ` Simon Horman
0 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2013-06-20 13:09 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Arnd,
this pull request is based on renesas-gpio-rcar-for-v3.11,
which you have already pulled. That tag adds the code and
documentation which is updated by the patches in this pull-request.
The following changes since commit 159f8a0209aff155af7f6fcdedd4a4484dd19c23:
gpio-rcar: Add DT support (2013-06-12 21:48:09 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-gpio-rcar2-for-v3.11
for you to fetch changes up to e305062e94719ef543ae936dd56501b5a36406c6:
gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections (2013-06-19 21:38:38 +0900)
----------------------------------------------------------------
Second Round of Renesas ARM based SoC GPIO R-Car updates for v3.11
Documentation enhancement and code cleanup by Laurent Pinchart.
----------------------------------------------------------------
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(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/2] gpio-rcar: Reference core gpio documentation in the DT bindings
2013-06-20 13:09 ` Simon Horman
@ 2013-06-20 13:09 ` Simon Horman
-1 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2013-06-20 13:09 UTC (permalink / raw)
To: linux-arm-kernel
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
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>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
.../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.2.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 1/2] gpio-rcar: Reference core gpio documentation in the DT bindings
@ 2013-06-20 13:09 ` Simon Horman
0 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2013-06-20 13:09 UTC (permalink / raw)
To: linux-arm-kernel
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
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>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
.../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.2.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
2013-06-20 13:09 ` Simon Horman
@ 2013-06-20 13:09 ` Simon Horman
-1 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2013-06-20 13:09 UTC (permalink / raw)
To: linux-arm-kernel
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
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>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
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.2.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
@ 2013-06-20 13:09 ` Simon Horman
0 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2013-06-20 13:09 UTC (permalink / raw)
To: linux-arm-kernel
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
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>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
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.2.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [GIT PULL 0/2] Renesas ARM based SoC GPIO R-Car updates for v3.11 #2
2013-06-20 13:09 ` Simon Horman
@ 2013-06-21 13:17 ` Arnd Bergmann
-1 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2013-06-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday 20 June 2013, Simon Horman wrote:
> Hi Olof, Hi Arnd,
>
> this pull request is based on renesas-gpio-rcar-for-v3.11,
> which you have already pulled. That tag adds the code and
> documentation which is updated by the patches in this pull-request.
>
> The following changes since commit 159f8a0209aff155af7f6fcdedd4a4484dd19c23:
>
> gpio-rcar: Add DT support (2013-06-12 21:48:09 +0900)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-gpio-rcar2-for-v3.11
>
> for you to fetch changes up to e305062e94719ef543ae936dd56501b5a36406c6:
>
> gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections (2013-06-19 21:38:38 +0900)
>
> ----------------------------------------------------------------
> Second Round of Renesas ARM based SoC GPIO R-Car updates for v3.11
>
> Documentation enhancement and code cleanup by Laurent Pinchart.
>
> ----------------------------------------------------------------
> 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(-)
>
Pulled into next/drivers, thanks!
Arnd
^ permalink raw reply [flat|nested] 16+ messages in thread
* [GIT PULL 0/2] Renesas ARM based SoC GPIO R-Car updates for v3.11 #2
@ 2013-06-21 13:17 ` Arnd Bergmann
0 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2013-06-21 13:17 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday 20 June 2013, Simon Horman wrote:
> Hi Olof, Hi Arnd,
>
> this pull request is based on renesas-gpio-rcar-for-v3.11,
> which you have already pulled. That tag adds the code and
> documentation which is updated by the patches in this pull-request.
>
> The following changes since commit 159f8a0209aff155af7f6fcdedd4a4484dd19c23:
>
> gpio-rcar: Add DT support (2013-06-12 21:48:09 +0900)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-gpio-rcar2-for-v3.11
>
> for you to fetch changes up to e305062e94719ef543ae936dd56501b5a36406c6:
>
> gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections (2013-06-19 21:38:38 +0900)
>
> ----------------------------------------------------------------
> Second Round of Renesas ARM based SoC GPIO R-Car updates for v3.11
>
> Documentation enhancement and code cleanup by Laurent Pinchart.
>
> ----------------------------------------------------------------
> 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(-)
>
Pulled into next/drivers, thanks!
Arnd
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
2013-06-17 19:21 ` Laurent Pinchart
@ 2013-06-18 8:02 ` Simon Horman
-1 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2013-06-18 8:02 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 17, 2013 at 09:21:08PM +0200, Laurent Pinchart wrote:
> On Monday 17 June 2013 23:19:07 Sergei Shtylyov wrote:
> > Hello.
> >
> > On 06/17/2013 11:15 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_SELECTED(CONFIG_OF)) and let the compiler optimize
> >
> > You're using IS_ENABLED() actually.
>
> Oops. We should fix gcc to check the commit messages :-)
>
> Simon, could you fix this while applying, or should I resubmit ?
Please re-spin, thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
@ 2013-06-18 8:02 ` Simon Horman
0 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2013-06-18 8:02 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 17, 2013 at 09:21:08PM +0200, Laurent Pinchart wrote:
> On Monday 17 June 2013 23:19:07 Sergei Shtylyov wrote:
> > Hello.
> >
> > On 06/17/2013 11:15 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_SELECTED(CONFIG_OF)) and let the compiler optimize
> >
> > You're using IS_ENABLED() actually.
>
> Oops. We should fix gcc to check the commit messages :-)
>
> Simon, could you fix this while applying, or should I resubmit ?
Please re-spin, thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
2013-06-17 19:19 ` Sergei Shtylyov
@ 2013-06-17 19:21 ` Laurent Pinchart
-1 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2013-06-17 19:21 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 17 June 2013 23:19:07 Sergei Shtylyov wrote:
> Hello.
>
> On 06/17/2013 11:15 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_SELECTED(CONFIG_OF)) and let the compiler optimize
>
> You're using IS_ENABLED() actually.
Oops. We should fix gcc to check the commit messages :-)
Simon, could you fix this while applying, or should I resubmit ?
> > 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
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
@ 2013-06-17 19:21 ` Laurent Pinchart
0 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2013-06-17 19:21 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 17 June 2013 23:19:07 Sergei Shtylyov wrote:
> Hello.
>
> On 06/17/2013 11:15 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_SELECTED(CONFIG_OF)) and let the compiler optimize
>
> You're using IS_ENABLED() actually.
Oops. We should fix gcc to check the commit messages :-)
Simon, could you fix this while applying, or should I resubmit ?
> > 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
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
2013-06-17 19:15 ` Laurent Pinchart
@ 2013-06-17 19:19 ` Sergei Shtylyov
-1 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-17 19:19 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 06/17/2013 11:15 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_SELECTED(CONFIG_OF)) and let the compiler optimize
You're using IS_ENABLED() actually.
> 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
WBR, Sergei
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
@ 2013-06-17 19:19 ` Sergei Shtylyov
0 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-17 19:19 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 06/17/2013 11:15 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_SELECTED(CONFIG_OF)) and let the compiler optimize
You're using IS_ENABLED() actually.
> 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
WBR, Sergei
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
2013-06-17 19:15 [PATCH 0/2] R-Car GPIO fixes Laurent Pinchart
@ 2013-06-17 19:15 ` Laurent Pinchart
0 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2013-06-17 19:15 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_SELECTED(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] 16+ messages in thread
* [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
@ 2013-06-17 19:15 ` Laurent Pinchart
0 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2013-06-17 19:15 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_SELECTED(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] 16+ messages in thread
end of thread, other threads:[~2013-06-21 13:17 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 13:09 [GIT PULL 0/2] Renesas ARM based SoC GPIO R-Car updates for v3.11 #2 Simon Horman
2013-06-20 13:09 ` Simon Horman
2013-06-20 13:09 ` [PATCH 1/2] gpio-rcar: Reference core gpio documentation in the DT bindings Simon Horman
2013-06-20 13:09 ` Simon Horman
2013-06-20 13:09 ` [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections Simon Horman
2013-06-20 13:09 ` Simon Horman
2013-06-21 13:17 ` [GIT PULL 0/2] Renesas ARM based SoC GPIO R-Car updates for v3.11 #2 Arnd Bergmann
2013-06-21 13:17 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2013-06-17 19:15 [PATCH 0/2] R-Car GPIO fixes Laurent Pinchart
2013-06-17 19:15 ` [PATCH 2/2] gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections Laurent Pinchart
2013-06-17 19:15 ` Laurent Pinchart
2013-06-17 19:19 ` Sergei Shtylyov
2013-06-17 19:19 ` Sergei Shtylyov
2013-06-17 19:21 ` Laurent Pinchart
2013-06-17 19:21 ` Laurent Pinchart
2013-06-18 8:02 ` Simon Horman
2013-06-18 8:02 ` Simon Horman
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.