Skip to content

Commit 49309a0

Browse files
committed
[dm][pinctrl] Set pinctrl default auto in platform bus.
Signed-off-by: GuEe-GUI <[email protected]>
1 parent 2fb53c8 commit 49309a0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

components/drivers/core/platform.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ static rt_err_t platform_probe(rt_device_t dev)
119119
struct rt_ofw_node *np = dev->ofw_node;
120120
#endif
121121

122+
#ifdef RT_USING_PINCTRL
123+
if (rt_pin_ctrl_confs_apply_by_name(dev, RT_NULL))
124+
{
125+
rt_pin_ctrl_confs_apply(dev, 0);
126+
}
127+
#endif
128+
122129
err = rt_dm_power_domain_attach(dev, RT_TRUE);
123130

124131
if (err && err != -RT_EEMPTY)

components/drivers/serial/dev_serial.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -664,11 +664,6 @@ static rt_err_t rt_serial_open(struct rt_device *dev, rt_uint16_t oflag)
664664
/* get open flags */
665665
dev->open_flag = oflag & 0xff;
666666

667-
#ifdef RT_USING_PINCTRL
668-
/* initialize iomux in DM */
669-
rt_pin_ctrl_confs_apply_by_name(dev, RT_NULL);
670-
#endif
671-
672667
/* initialize the Rx/Tx structure according to open flag */
673668
if (serial->serial_rx == RT_NULL)
674669
{

0 commit comments

Comments
 (0)