diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2018-11-21 10:35:17 +0100 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2018-11-26 16:45:10 +0530 |
commit | 786a9ab1330169f2602238822b4df5d5c4c98f6c (patch) | |
tree | 7ae4e8f86c10b3d103b9d095f9a465e9fdcb4cb1 /drivers/gpio | |
parent | adcf60ce14c8250761af9de907eb6c7d096c26d3 (diff) | |
download | linux-786a9ab1330169f2602238822b4df5d5c4c98f6c.tar.bz2 |
gpio: davinci: restore a way to manually specify the GPIO base
Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and
automatic base selection") broke the network support in legacy boot
mode for da850-evm since we can no longer request the MDIO clock GPIO.
Other boards may be broken too, which I haven't tested.
The problem is in the fact that most board files still use the legacy
GPIO API where lines are requested by numbers rather than descriptors.
While this should be fixed eventually, in order to unbreak the board
for now - provide a way to manually specify the GPIO base in platform
data.
Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-davinci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 5c1564fcc24e..bdb29e51b417 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -258,7 +258,7 @@ static int davinci_gpio_probe(struct platform_device *pdev) chips->chip.set = davinci_gpio_set; chips->chip.ngpio = ngpio; - chips->chip.base = -1; + chips->chip.base = pdata->no_auto_base ? pdata->base : -1; #ifdef CONFIG_OF_GPIO chips->chip.of_gpio_n_cells = 2; |