Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/drivers/core/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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)))
{
Expand Down
5 changes: 0 additions & 5 deletions components/drivers/serial/dev_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down