]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
i3c: dw: Add optional apb clock
authorAniket <aniketmaurya@google.com>
Fri, 28 Jun 2024 15:46:18 +0000 (15:46 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 26 Jul 2024 12:21:29 +0000 (14:21 +0200)
Besides the core clock, IP also has an apb interface clock.
Add an optional hook for the same.

Signed-off-by: Aniket <aniketmaurya@google.com>
Link: https://lore.kernel.org/r/20240628154618.327151-1-aniketmaurya@google.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/dw-i3c-master.c
drivers/i3c/master/dw-i3c-master.h

index 4e3335641dcd8c0e7eacda1fc56c4ab1fb09bd8a..0ca41782f3a6391dd97f9031cd6ea1d9605c6e19 100644 (file)
@@ -1454,6 +1454,10 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
        if (IS_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,
                                                                    "core_rst");
        if (IS_ERR(master->core_rst))
index 7e76ca381d9f65074e169cf1cea9f9a59b588b4e..fb7121c6c687c3124e4f38440b8b75bceefdf9e8 100644 (file)
@@ -36,6 +36,7 @@ struct dw_i3c_master {
        void __iomem *regs;
        struct reset_control *core_rst;
        struct clk *core_clk;
+       struct clk *pclk;
        char version[5];
        char type[5];
        u32 sir_rej_mask;