mirror of
https://github.com/torvalds/linux.git
synced 2024-12-31 23:31:29 +00:00
pinctrl: imx1-core populate subdevices
Support gpio devicetree subnodes to allow a more detailed DT hardware description. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
b9f2f2ecce
commit
31d610f196
@ -52,12 +52,25 @@ Required properties for pin configuration node:
|
|||||||
CONFIG can be 0 or 1, meaning Pullup disable/enable.
|
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:
|
Example:
|
||||||
|
|
||||||
iomuxc: iomuxc@10015000 {
|
iomuxc: iomuxc@10015000 {
|
||||||
compatible = "fsl,imx27-iomuxc";
|
compatible = "fsl,imx27-iomuxc";
|
||||||
reg = <0x10015000 0x600>;
|
reg = <0x10015000 0x600>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges;
|
||||||
|
|
||||||
|
gpio1: gpio@10015000 {
|
||||||
|
...
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
uart {
|
uart {
|
||||||
pinctrl_uart1: uart-1 {
|
pinctrl_uart1: uart-1 {
|
||||||
@ -83,6 +96,15 @@ The above example using macros:
|
|||||||
iomuxc: iomuxc@10015000 {
|
iomuxc: iomuxc@10015000 {
|
||||||
compatible = "fsl,imx27-iomuxc";
|
compatible = "fsl,imx27-iomuxc";
|
||||||
reg = <0x10015000 0x600>;
|
reg = <0x10015000 0x600>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
ranges;
|
||||||
|
|
||||||
|
gpio1: gpio@10015000 {
|
||||||
|
...
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
uart {
|
uart {
|
||||||
pinctrl_uart1: uart-1 {
|
pinctrl_uart1: uart-1 {
|
||||||
|
@ -638,6 +638,13 @@ int imx1_pinctrl_core_probe(struct platform_device *pdev,
|
|||||||
return -EINVAL;
|
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");
|
dev_info(&pdev->dev, "initialized IMX pinctrl driver\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user