mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-06 00:45:22 +08:00
[dm][pinctrl] Set pinctrl default auto in platform bus. (#11052)
Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#ifdef RT_USING_CLK
|
||||
#include <drivers/clk.h>
|
||||
#endif
|
||||
#include <drivers/dev_pin.h>
|
||||
#include <drivers/platform.h>
|
||||
#include <drivers/core/bus.h>
|
||||
#include <drivers/core/dm.h>
|
||||
@@ -122,6 +123,13 @@ static rt_err_t platform_probe(rt_device_t dev)
|
||||
struct rt_ofw_node *np = dev->ofw_node;
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_PINCTRL
|
||||
if (rt_pin_ctrl_confs_apply_by_name(dev, RT_NULL))
|
||||
{
|
||||
rt_pin_ctrl_confs_apply(dev, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_CLK
|
||||
if ((err = rt_ofw_clk_set_defaults(dev->ofw_node)))
|
||||
{
|
||||
|
||||
@@ -664,11 +664,6 @@ static rt_err_t rt_serial_open(struct rt_device *dev, rt_uint16_t oflag)
|
||||
/* get open flags */
|
||||
dev->open_flag = oflag & 0xff;
|
||||
|
||||
#ifdef RT_USING_PINCTRL
|
||||
/* initialize iomux in DM */
|
||||
rt_pin_ctrl_confs_apply_by_name(dev, RT_NULL);
|
||||
#endif
|
||||
|
||||
/* initialize the Rx/Tx structure according to open flag */
|
||||
if (serial->serial_rx == RT_NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user