Commit c3ab9853 authored by Peng Fan's avatar Peng Fan Committed by Simon Glass
Browse files

dm: core: device: set pinctrl state for pinctrl device

We may have pinmux settings for pinctrl device, like the following
&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_hog_1>;
	imx6ul-evk {
		pinctrl_hog_1: hoggrp-1 {
			fsl,pins = <
				MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x17059 /* SD1 CD */
				MX6UL_PAD_GPIO1_IO09__GPIO1_IO09        0x17059 /* SD1 RESET */
				MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00	0x80000000

We should not only select pinctrl state for non pinctrl devices, we
need also to handle pin mux settings such as pinctrl_log for pinctrl

So at the end of probing process of pinctrl device, select the default
state of pinctrl device.
Signed-off-by: default avatarPeng Fan <>
Cc: Simon Glass <>
Reviewed-by: default avatarSimon Glass <>
Reviewed-by: default avatarMasahiro Yamada <>
parent ff6552e8
......@@ -332,6 +332,9 @@ int device_probe(struct udevice *dev)
if (ret)
goto fail_uclass;
if (dev->parent && device_get_uclass_id(dev) == UCLASS_PINCTRL)
pinctrl_select_state(dev, "default");
return 0;
if (device_remove(dev)) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment