Commit a0d48ebf authored by Aniket's avatar Aniket Committed by Alexandre Belloni

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: default avatarAniket <aniketmaurya@google.com>
Link: https://lore.kernel.org/r/20240628154618.327151-1-aniketmaurya@google.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 54f5079e
...@@ -1454,6 +1454,10 @@ int dw_i3c_common_probe(struct dw_i3c_master *master, ...@@ -1454,6 +1454,10 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
if (IS_ERR(master->core_clk)) if (IS_ERR(master->core_clk))
return PTR_ERR(master->core_clk); return PTR_ERR(master->core_clk);
master->pclk = devm_clk_get_optional_enabled(&pdev->dev, "pclk");
if (IS_ERR(master->pclk))
return PTR_ERR(master->pclk);
master->core_rst = devm_reset_control_get_optional_exclusive(&pdev->dev, master->core_rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
"core_rst"); "core_rst");
if (IS_ERR(master->core_rst)) if (IS_ERR(master->core_rst))
......
...@@ -36,6 +36,7 @@ struct dw_i3c_master { ...@@ -36,6 +36,7 @@ struct dw_i3c_master {
void __iomem *regs; void __iomem *regs;
struct reset_control *core_rst; struct reset_control *core_rst;
struct clk *core_clk; struct clk *core_clk;
struct clk *pclk;
char version[5]; char version[5];
char type[5]; char type[5];
u32 sir_rej_mask; u32 sir_rej_mask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment