提交 2c936374 编写于 作者: B Beniamino Galvani 提交者: Tom Rini

pinctrl: generic: scan for "pins" and "groups" properties in sub-nodes

In cases where the pins and groups definitions are in a sub-node, as:

	uart_a {
		mux {
			groups = "uart_tx_a", "uart_rx_a";
			function = "uart_a";
		};
	};

pinctrl_generic_set_state_subnode() returns an error for the top-level
node and pinctrl_generic_set_state() fails. Instead, return success so
that the child nodes are tried.
Signed-off-by: NBeniamino Galvani <b.galvani@gmail.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 950fe26d
......@@ -312,8 +312,10 @@ static int pinctrl_generic_set_state_subnode(struct udevice *dev,
is_group = true;
strings_count = fdt_count_strings(fdt, node,
subnode_target_type);
if (strings_count < 0)
return -EINVAL;
if (strings_count < 0) {
/* skip this node; may contain config child nodes */
return 0;
}
}
for (i = 0; i < strings_count; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册