From: mpa@pengutronix.de (Markus Pargmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: imx1-core populate subdevices
Date: Mon, 11 Nov 2013 19:19:47 +0100 [thread overview]
Message-ID: <1384193987-20740-1-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <CACRpkda2dO6DvurEhaTVGJv8nDyEGOEeLCap-_+1e1mHtD0XyQ@mail.gmail.com>
Support gpio devicetree subnodes to allow a more detailed DT hardware
description.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
Hi,
This is an incremental patch for the imx1-core and imx27-pinctrl patches to
support the gpio nodes as iomux subdevices.
Linus, I can resend this integrated into the other two patches if you want.
Regards,
Markus Pargmann
.../bindings/pinctrl/fsl,imx27-pinctrl.txt | 22 ++++++++++++++++++++++
drivers/pinctrl/pinctrl-imx1-core.c | 7 +++++++
2 files changed, 29 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx27-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx27-pinctrl.txt
index 353eca0..d1706ea 100644
--- a/Documentation/devicetree/bindings/pinctrl/fsl,imx27-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx27-pinctrl.txt
@@ -52,12 +52,25 @@ Required properties for pin configuration node:
CONFIG can be 0 or 1, meaning Pullup disable/enable.
+The iomux controller has gpio child nodes which are embedded in the iomux
+control registers. They have to be defined as child nodes of the iomux device
+node. If gpio subnodes are defined "#address-cells", "#size-cells" and "ranges"
+properties for the iomux device node are required.
Example:
iomuxc: iomuxc at 10015000 {
compatible = "fsl,imx27-iomuxc";
reg = <0x10015000 0x600>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ gpio1: gpio at 10015000 {
+ ...
+ };
+
+ ...
uart {
pinctrl_uart1: uart-1 {
@@ -83,6 +96,15 @@ The above example using macros:
iomuxc: iomuxc at 10015000 {
compatible = "fsl,imx27-iomuxc";
reg = <0x10015000 0x600>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ gpio1: gpio at 10015000 {
+ ...
+ };
+
+ ...
uart {
pinctrl_uart1: uart-1 {
diff --git a/drivers/pinctrl/pinctrl-imx1-core.c b/drivers/pinctrl/pinctrl-imx1-core.c
index 4d5a9e7..2eadba7 100644
--- a/drivers/pinctrl/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/pinctrl-imx1-core.c
@@ -638,6 +638,13 @@ int imx1_pinctrl_core_probe(struct platform_device *pdev,
return -EINVAL;
}
+ ret = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
+ if (ret) {
+ pinctrl_unregister(ipctl->pctl);
+ dev_err(&pdev->dev, "Failed to populate subdevices\n");
+ return ret;
+ }
+
dev_info(&pdev->dev, "initialized IMX pinctrl driver\n");
return 0;
--
1.8.4.2
next prev parent reply other threads:[~2013-11-11 18:19 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 9:00 [PATCH v6 0/8] ARM: imx27 pinctrl Markus Pargmann
2013-10-28 9:00 ` [PATCH v6 1/8] pinctrl: imx1 core driver Markus Pargmann
2013-10-29 13:55 ` Linus Walleij
2013-10-29 15:10 ` Markus Pargmann
2013-10-29 14:09 ` Linus Walleij
2013-10-28 9:00 ` [PATCH v6 2/8] pinctrl: imx27: imx27 pincontrol driver Markus Pargmann
2013-10-28 11:17 ` Kumar Gala
2013-10-28 16:43 ` Markus Pargmann
2013-10-28 19:28 ` Kumar Gala
2013-10-29 14:03 ` Linus Walleij
2013-10-29 14:32 ` [PATCH v7] " Markus Pargmann
2013-10-29 16:00 ` Linus Walleij
2013-11-06 16:54 ` Matt Sealey
2013-11-07 9:12 ` Markus Pargmann
2013-11-07 9:28 ` Lucas Stach
2013-11-07 10:38 ` Markus Pargmann
2013-11-07 16:58 ` Matt Sealey
2013-11-11 9:50 ` Linus Walleij
2013-10-28 9:00 ` [PATCH v6 3/8] ARM: dts: imx27 pin functions Markus Pargmann
2013-10-28 9:00 ` [PATCH v6 4/8] ARM: dts: imx27 pinctrl Markus Pargmann
2013-11-06 22:43 ` Matt Sealey
2013-11-08 9:45 ` Linus Walleij
2013-11-08 13:56 ` Markus Pargmann
2013-11-11 10:29 ` Linus Walleij
2013-11-11 18:19 ` Markus Pargmann [this message]
2013-11-19 20:01 ` [PATCH] pinctrl: imx1-core populate subdevices Linus Walleij
2013-11-27 3:33 ` Chris Ruehl
2013-11-27 5:19 ` Chris Ruehl
2013-11-27 7:31 ` Markus Pargmann
2013-11-27 8:45 ` Chris Ruehl
2013-10-28 9:00 ` [PATCH v6 5/8] ARM: dts: imx27 phyCARD-S pinctrl Markus Pargmann
2013-10-28 9:00 ` [PATCH v6 6/8] ARM: dts: imx27 phycore move uart1 to rdk Markus Pargmann
2013-10-28 9:00 ` [PATCH v6 7/8] ARM: dts: imx27 phycore pinctrl Markus Pargmann
2013-10-28 9:00 ` [PATCH v6 8/8] ARM: imx27: enable pinctrl Markus Pargmann
2013-11-06 12:49 ` [PATCH v6 0/8] ARM: imx27 pinctrl Markus Pargmann
2013-11-06 13:27 ` Shawn Guo
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=1384193987-20740-1-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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).