Skip to content

Commit 55a8b3c

Browse files
abelvesaShawn Guo
authored andcommitted
clk: imx: pll14xx: Add the device as argument when registering
In order to allow runtime PM, the device needs to be passed on to the register function. Audiomix clock controller, used on i.MX8MP and future platforms, registers a pll14xx and has runtime PM support. Signed-off-by: Abel Vesa <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent 1e54afe commit 55a8b3c

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

drivers/clk/imx/clk-pll14xx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ static const struct clk_ops clk_pll1443x_ops = {
378378
.set_rate = clk_pll1443x_set_rate,
379379
};
380380

381-
struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
382-
void __iomem *base,
383-
const struct imx_pll14xx_clk *pll_clk)
381+
struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name,
382+
const char *parent_name, void __iomem *base,
383+
const struct imx_pll14xx_clk *pll_clk)
384384
{
385385
struct clk_pll14xx *pll;
386386
struct clk_hw *hw;
@@ -426,7 +426,7 @@ struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
426426

427427
hw = &pll->hw;
428428

429-
ret = clk_hw_register(NULL, hw);
429+
ret = clk_hw_register(dev, hw);
430430
if (ret) {
431431
pr_err("%s: failed to register pll %s %d\n",
432432
__func__, name, ret);

drivers/clk/imx/clk.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ struct clk *imx_clk_pll14xx(const char *name, const char *parent_name,
133133
#define imx_clk_pll14xx(name, parent_name, base, pll_clk) \
134134
to_clk(imx_clk_hw_pll14xx(name, parent_name, base, pll_clk))
135135

136-
struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
137-
void __iomem *base,
138-
const struct imx_pll14xx_clk *pll_clk);
136+
struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name,
137+
const char *parent_name, void __iomem *base,
138+
const struct imx_pll14xx_clk *pll_clk);
139139

140140
struct clk_hw *imx_clk_hw_pllv1(enum imx_pllv1_type type, const char *name,
141141
const char *parent, void __iomem *base);
@@ -242,6 +242,13 @@ static inline struct clk *to_clk(struct clk_hw *hw)
242242
return hw->clk;
243243
}
244244

245+
static inline struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name,
246+
void __iomem *base,
247+
const struct imx_pll14xx_clk *pll_clk)
248+
{
249+
return imx_dev_clk_hw_pll14xx(NULL, name, parent_name, base, pll_clk);
250+
}
251+
245252
static inline struct clk_hw *imx_clk_hw_fixed(const char *name, int rate)
246253
{
247254
return clk_hw_register_fixed_rate(NULL, name, NULL, 0, rate);

0 commit comments

Comments
 (0)