Commit e7692e2c authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'renesas-gpio-rcar2-for-v3.11' of...

Merge tag 'renesas-gpio-rcar2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

From Simon Horman:

Second Round of Renesas ARM based SoC GPIO R-Car updates for v3.11

Documentation enhancement and code cleanup by Laurent Pinchart.

* tag 'renesas-gpio-rcar2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  gpio-rcar: Remove #ifdef CONFIG_OF around OF-specific sections
  gpio-rcar: Reference core gpio documentation in the DT bindings
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents d405534d e305062e
...@@ -16,18 +16,12 @@ Required Properties: ...@@ -16,18 +16,12 @@ Required Properties:
- gpio-controller: Marks the device node as a gpio controller. - 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 - #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 cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
active low flag (bit 0) is currently supported. GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
- gpio-ranges: Range of pins managed by the GPIO controller as a 4-cells - gpio-ranges: Range of pins managed by the GPIO controller.
tuple using the following syntax.
Please refer to gpio.txt in this directory for details of gpio-ranges property
<[phandle of the pin controller node] and the common GPIO bindings used by client devices.
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.
Example: R8A7779 (R-Car H1) GPIO controller nodes Example: R8A7779 (R-Car H1) GPIO controller nodes
......
...@@ -279,16 +279,13 @@ static struct irq_domain_ops gpio_rcar_irq_domain_ops = { ...@@ -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) static void gpio_rcar_parse_pdata(struct gpio_rcar_priv *p)
{ {
struct gpio_rcar_config *pdata = p->pdev->dev.platform_data; struct gpio_rcar_config *pdata = p->pdev->dev.platform_data;
#ifdef CONFIG_OF
struct device_node *np = p->pdev->dev.of_node; struct device_node *np = p->pdev->dev.of_node;
struct of_phandle_args args; struct of_phandle_args args;
int ret; int ret;
#endif
if (pdata) if (pdata) {
p->config = *pdata; p->config = *pdata;
#ifdef CONFIG_OF } else if (IS_ENABLED(CONFIG_OF) && np) {
else if (np) {
ret = of_parse_phandle_with_args(np, "gpio-ranges", ret = of_parse_phandle_with_args(np, "gpio-ranges",
"#gpio-range-cells", 0, &args); "#gpio-range-cells", 0, &args);
p->config.number_of_pins = ret == 0 && args.args_count == 3 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) ...@@ -296,7 +293,6 @@ static void gpio_rcar_parse_pdata(struct gpio_rcar_priv *p)
: RCAR_MAX_GPIO_PER_BANK; : RCAR_MAX_GPIO_PER_BANK;
p->config.gpio_base = -1; p->config.gpio_base = -1;
} }
#endif
if (p->config.number_of_pins == 0 || if (p->config.number_of_pins == 0 ||
p->config.number_of_pins > RCAR_MAX_GPIO_PER_BANK) { p->config.number_of_pins > RCAR_MAX_GPIO_PER_BANK) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment