From b0a5bfe66bc4e362b736d91d4251f5b8fb202397 Mon Sep 17 00:00:00 2001 From: GuEe-GUI <2991707448@qq.com> Date: Fri, 1 Nov 2024 13:10:45 +0800 Subject: [PATCH] [DM/FIXUP] Fixup pinctrl depend auto Signed-off-by: GuEe-GUI <2991707448@qq.com> --- components/drivers/pinctrl/pinctrl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/drivers/pinctrl/pinctrl.c b/components/drivers/pinctrl/pinctrl.c index f32749248f..2fbfa7a70d 100644 --- a/components/drivers/pinctrl/pinctrl.c +++ b/components/drivers/pinctrl/pinctrl.c @@ -92,6 +92,11 @@ static rt_err_t ofw_pin_ctrl_confs_apply(struct rt_ofw_node *np, int index) if (pinctrl_np) { + if (!rt_ofw_data(pinctrl_np)) + { + rt_platform_ofw_request(pinctrl_np); + } + pinctrl = rt_ofw_data(pinctrl_np); rt_ofw_node_put(pinctrl_np); @@ -217,6 +222,8 @@ rt_err_t rt_pin_ctrl_confs_apply_by_name(struct rt_device *device, const char *n err = ofw_pin_ctrl_confs_apply_by_name(device->ofw_node, name); } #endif /* RT_USING_OFW */ + + RT_UNUSED(name); } else {