]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
pinctrl: meson: add optional region for drive strength
authorJerome Brunet <jbrunet@baylibre.com>
Thu, 17 Jan 2019 10:23:15 +0000 (11:23 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 21 Jan 2019 13:50:20 +0000 (14:50 +0100)
On the G12a, there is a new 'region' to handle the drive-strength.
This is optional since the older do not have this.

Fixes: 29ae0952e85f ("pinctrl: meson-g12a: add pinctrl driver support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/meson/pinctrl-meson.c
drivers/pinctrl/meson/pinctrl-meson.h

index a4ae1ac5369e9fc110b7443e0b3c6af08e62847e..96a4a72708e49a47910026b78befe36402b3c50a 100644 (file)
@@ -507,6 +507,12 @@ static int meson_pinctrl_parse_dt(struct meson_pinctrl *pc,
        if (IS_ERR(pc->reg_pullen))
                pc->reg_pullen = pc->reg_pull;
 
+       pc->reg_ds = meson_map_resource(pc, gpio_np, "ds");
+       if (IS_ERR(pc->reg_ds)) {
+               dev_dbg(pc->dev, "ds registers not found - skipping\n");
+               pc->reg_ds = NULL;
+       }
+
        return 0;
 }
 
index eff61ea1c67e08235866938b1edc0e967d42c41e..5eaab925f427fcefe7c0f556ccbfe22d9845fc63 100644 (file)
@@ -120,6 +120,7 @@ struct meson_pinctrl {
        struct regmap *reg_pullen;
        struct regmap *reg_pull;
        struct regmap *reg_gpio;
+       struct regmap *reg_ds;
        struct gpio_chip chip;
        struct device_node *of_node;
 };