From: Jerome Brunet <jbrunet@baylibre.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Kevin Hilman <khilman@baylibre.com>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
Jerome Brunet <jbrunet@baylibre.com>
Subject: [PATCH 3/3] pinctrl: meson: add optional region for drive strength
Date: Thu, 17 Jan 2019 11:23:15 +0100 [thread overview]
Message-ID: <20190117102315.1833-4-jbrunet@baylibre.com> (raw)
In-Reply-To: <20190117102315.1833-1-jbrunet@baylibre.com>
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>
---
drivers/pinctrl/meson/pinctrl-meson.c | 6 ++++++
drivers/pinctrl/meson/pinctrl-meson.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index a4ae1ac5369e..96a4a72708e4 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -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;
}
diff --git a/drivers/pinctrl/meson/pinctrl-meson.h b/drivers/pinctrl/meson/pinctrl-meson.h
index eff61ea1c67e..5eaab925f427 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.h
+++ b/drivers/pinctrl/meson/pinctrl-meson.h
@@ -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;
};
--
2.20.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2019-01-17 10:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 10:23 [PATCH 0/3] pinctrl: meson: g12a fixes Jerome Brunet
2019-01-17 10:23 ` [PATCH 1/3] dt-bindings: pinctrl: meson: update register descriptions Jerome Brunet
2019-01-17 10:23 ` [PATCH 2/3] pinctrl: meson: fix G12A ao pull registers base address Jerome Brunet
2019-01-17 10:23 ` Jerome Brunet [this message]
2019-01-21 13:53 ` [PATCH 0/3] pinctrl: meson: g12a fixes Linus Walleij
2019-01-21 15:36 ` Jerome Brunet
2019-02-07 3:11 ` Kevin Hilman
2019-02-08 13:57 ` Linus Walleij
2019-02-08 17:27 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190117102315.1833-4-jbrunet@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=khilman@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).