Skip to content

Commit a0d48eb

Browse files
Aniketalexandrebelloni
authored andcommitted
i3c: dw: Add optional apb clock
Besides the core clock, IP also has an apb interface clock. Add an optional hook for the same. Signed-off-by: Aniket <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 54f5079 commit a0d48eb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/i3c/master/dw-i3c-master.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,10 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
14541454
if (IS_ERR(master->core_clk))
14551455
return PTR_ERR(master->core_clk);
14561456

1457+
master->pclk = devm_clk_get_optional_enabled(&pdev->dev, "pclk");
1458+
if (IS_ERR(master->pclk))
1459+
return PTR_ERR(master->pclk);
1460+
14571461
master->core_rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
14581462
"core_rst");
14591463
if (IS_ERR(master->core_rst))

drivers/i3c/master/dw-i3c-master.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ struct dw_i3c_master {
3636
void __iomem *regs;
3737
struct reset_control *core_rst;
3838
struct clk *core_clk;
39+
struct clk *pclk;
3940
char version[5];
4041
char type[5];
4142
u32 sir_rej_mask;

0 commit comments

Comments
 (0)