diff options
author | Neil Armstrong <narmstrong@baylibre.com> | 2017-03-23 17:27:28 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-03-28 11:40:24 +0200 |
commit | c7fc5fbafa5a676813d68b0f24ce980d717eb940 (patch) | |
tree | 97f2f41c05aab3b57f7f6de612afafe6ff5b3b30 /drivers/pinctrl | |
parent | 5fb7edb38dc7122a4d73980c86f4a4e600a535b4 (diff) |
pinctrl: meson: use gpio-ranges from DT
When trying to add a gpio-hog, we enter a weird loop where the gpio-ranges
is needed when gpiochip_add_data() is called but in the current implementation
the ranges are added from the driver afterwards.
A simple solution is to rely on the DR gpio-ranges attribute and remove the
call to gpiochip_add_pin_range().
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/meson/pinctrl-meson.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c index cf1686e04378..66ed70c12733 100644 --- a/drivers/pinctrl/meson/pinctrl-meson.c +++ b/drivers/pinctrl/meson/pinctrl-meson.c @@ -555,22 +555,10 @@ static int meson_gpiolib_register(struct meson_pinctrl *pc) if (ret) { dev_err(pc->dev, "can't add gpio chip %s\n", pc->data->name); - goto fail; - } - - ret = gpiochip_add_pin_range(&pc->chip, dev_name(pc->dev), - 0, pc->data->pin_base, - pc->chip.ngpio); - if (ret) { - dev_err(pc->dev, "can't add pin range\n"); - goto fail; + return ret; } return 0; -fail: - gpiochip_remove(&pc->chip); - - return ret; } static struct regmap_config meson_regmap_config = { |