diff options
author | Paul Moore <pmoore@redhat.com> | 2014-08-05 15:44:22 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2014-08-05 15:44:22 -0400 |
commit | aa9e0de81b5b257f6dae48efe2ed5f255f066497 (patch) | |
tree | 9b0b791d5912368006115427e74105cfe26750bd /drivers/gpio/gpiolib-of.c | |
parent | 4fbe63d1c773cceef3fe1f6ed0c9c268f4f24760 (diff) | |
parent | 19583ca584d6f574384e17fe7613dfaeadcdc4a6 (diff) | |
download | op-kernel-dev-aa9e0de81b5b257f6dae48efe2ed5f255f066497.zip op-kernel-dev-aa9e0de81b5b257f6dae48efe2ed5f255f066497.tar.gz |
Merge tag 'v3.16' into next
Linux 3.16
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 2024d45..af7e25c 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -48,7 +48,7 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data) if (ret < 0) return false; - gg_data->out_gpio = gpio_to_desc(ret + gc->base); + gg_data->out_gpio = gpiochip_get_desc(gc, ret); return true; } @@ -96,6 +96,20 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, } EXPORT_SYMBOL(of_get_named_gpiod_flags); +int of_get_named_gpio_flags(struct device_node *np, const char *list_name, + int index, enum of_gpio_flags *flags) +{ + struct gpio_desc *desc; + + desc = of_get_named_gpiod_flags(np, list_name, index, flags); + + if (IS_ERR(desc)) + return PTR_ERR(desc); + else + return desc_to_gpio(desc); +} +EXPORT_SYMBOL(of_get_named_gpio_flags); + /** * of_gpio_simple_xlate - translate gpio_spec to the GPIO number and flags * @gc: pointer to the gpio_chip structure |