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

Documentation enhancement and code cleanup by Laurent Pinchart.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRwvwkAAoJENfPZGlqN0++mukP/1+rldtrgijEKjqRLFFll2M1
 3Z1FABTR7IywSzGvr2npBpmfPsa+w9Cmnn6BDTKUHjJYyurjiinumtDLH5oo6/Xb
 fXmhmco1huO0rnf9C84GysmDjDdSqYMs6wEaG2XjDcLPpYd6pLkb5/tl5bnTCoSt
 MW5kChypAVcrVflc2DMMU0cTtJ2joslOASHxlTXwCfgdG87R8iX2FtoPynKL9l3i
 pe0R8ASoZkxtGd4JT9PJyORq0PtACJB0z4Wm2V7wM8S/Cln4mDIl6NJc3VWCMnHp
 2YRvSMhUDpKfhDrSnGFVHAhJBMuJQdVRHSxj0ZwDKQi9xeQr7lsfGa5bbb3a3pOr
 HYGz/eRkExIRWFw8rQ4YGoEAN6T7os5BTxxSTagRztZxRz5fD+yqQMGzv9/uIG9c
 iKOkGhrR0UPz4Ul8fo/C+uX8kvSfX4CpVozCBFOnszW0pMF/qIabsOVpJoAMOBsR
 q2YIyLkFxn/S97DK4xm/lyX1o3SBwIOeyCHb5KIlxFS6AVgOvxJwowjfQSaDbrP0
 MIFxTSd4rkIt3kph6gT2cfJ6l8TbXs0bxtxWzOfu4UAVrwdc/HJzLUcSs++0s7Ca
 +Z48tjhuz3a8WPQgay1l8PoEaFXzvMaLNTMbG+Zfx9gVyWbmyk5r6VM7akXJqy2P
 cJA8purzFCEWjmk0od51
 =tnz4
 -----END PGP SIGNATURE-----

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: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2013-06-21 15:15:57 +02:00
commit e7692e2cfd
2 changed files with 7 additions and 17 deletions

View file

@ -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.
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.
<[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.
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

View file

@ -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) {