Skip to content

Commit b171bf1

Browse files
committed
driver: clock_control: renesas_ra: Use pclkblock's clock src defaultly
When omitting the clk_src definition in a child node of a pclkblock, it uses the source of the parent node. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent c4f2efd commit b171bf1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/clock_control/clock_control_renesas_ra_cgc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ static const struct clock_control_driver_api clock_control_reneas_ra_api = {
9090
#define INIT_PCLK(node_id) \
9191
IF_ENABLED(DT_NODE_HAS_COMPAT(node_id, renesas_ra_cgc_pclk), \
9292
(static const struct clock_control_ra_pclk_cfg node_id##_cfg = \
93-
{.clk_src = DT_PROP_OR(node_id, clk_src, RA_CLOCK_SOURCE_DISABLE), \
93+
{.clk_src = DT_PROP_OR(node_id, clk_src, \
94+
DT_PROP_OR(DT_PARENT(node_id), sysclock_src, \
95+
RA_CLOCK_SOURCE_DISABLE)), \
9496
.clk_div = DT_PROP_OR(node_id, clk_div, RA_SYS_CLOCK_DIV_1)}; \
9597
DEVICE_DT_DEFINE(node_id, &clock_control_ra_init_pclk, NULL, NULL, \
9698
&node_id##_cfg, PRE_KERNEL_1, \

0 commit comments

Comments
 (0)