Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1243069
| From | Jisheng Zhang <jszhang@marvell.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 1/6] pinctrl: berlin: introduce berlin_pinctrl_probe_regmap() |
| Date | 2015-10-09 09:00 +0200 |
| Message-ID | <qhzOP-2W9-27@gated-at.bofh.it> (permalink) |
| References | <qhzOO-2W9-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This is to prepare for the next berlin4ct support, where we won't use
simple-mfd any more.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/pinctrl/berlin/berlin.c | 26 +++++++++++++++++---------
drivers/pinctrl/berlin/berlin.h | 4 ++++
2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
index f495806..898afa4 100644
--- a/drivers/pinctrl/berlin/berlin.c
+++ b/drivers/pinctrl/berlin/berlin.c
@@ -292,20 +292,14 @@ static struct pinctrl_desc berlin_pctrl_desc = {
.owner = THIS_MODULE,
};
-int berlin_pinctrl_probe(struct platform_device *pdev,
- const struct berlin_pinctrl_desc *desc)
+int berlin_pinctrl_probe_regmap(struct platform_device *pdev,
+ const struct berlin_pinctrl_desc *desc,
+ struct regmap *regmap)
{
struct device *dev = &pdev->dev;
- struct device_node *parent_np = of_get_parent(dev->of_node);
struct berlin_pinctrl *pctrl;
- struct regmap *regmap;
int ret;
- regmap = syscon_node_to_regmap(parent_np);
- of_node_put(parent_np);
- if (IS_ERR(regmap))
- return PTR_ERR(regmap);
-
pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
if (!pctrl)
return -ENOMEM;
@@ -330,3 +324,17 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
return 0;
}
+
+int berlin_pinctrl_probe(struct platform_device *pdev,
+ const struct berlin_pinctrl_desc *desc)
+{
+ struct device *dev = &pdev->dev;
+ struct device_node *parent_np = of_get_parent(dev->of_node);
+ struct regmap *regmap = syscon_node_to_regmap(parent_np);
+
+ of_node_put(parent_np);
+ if (IS_ERR(regmap))
+ return PTR_ERR(regmap);
+
+ return berlin_pinctrl_probe_regmap(pdev, desc, regmap);
+}
diff --git a/drivers/pinctrl/berlin/berlin.h b/drivers/pinctrl/berlin/berlin.h
index e1aa841..dabbd2a 100644
--- a/drivers/pinctrl/berlin/berlin.h
+++ b/drivers/pinctrl/berlin/berlin.h
@@ -58,4 +58,8 @@ struct berlin_pinctrl_function {
int berlin_pinctrl_probe(struct platform_device *pdev,
const struct berlin_pinctrl_desc *desc);
+int berlin_pinctrl_probe_regmap(struct platform_device *pdev,
+ const struct berlin_pinctrl_desc *desc,
+ struct regmap *regmap);
+
#endif /* __PINCTRL_BERLIN_H */
--
2.6.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/6] arm64: berlin: add pinctrl support Jisheng Zhang <jszhang@marvell.com> - 2015-10-09 09:00 +0200 [PATCH v3 4/6] pinctrl: dt-binding: document berlin4ct SoC pinctrl Jisheng Zhang <jszhang@marvell.com> - 2015-10-09 09:00 +0200 [PATCH v3 2/6] pinctrl: berlin: add the berlin4ct pinctrl driver Jisheng Zhang <jszhang@marvell.com> - 2015-10-09 09:00 +0200 [PATCH v3 1/6] pinctrl: berlin: introduce berlin_pinctrl_probe_regmap() Jisheng Zhang <jszhang@marvell.com> - 2015-10-09 09:00 +0200 [PATCH v3 6/6] arm64: dts: berlin4ct: add default pinmux for uart0 Jisheng Zhang <jszhang@marvell.com> - 2015-10-09 09:00 +0200 [PATCH v3 3/6] arm64: berlin: add the pinctrl dependency for Marvell Berlin SoCs Jisheng Zhang <jszhang@marvell.com> - 2015-10-09 09:00 +0200
csiph-web