[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM0PR04MB4481D97D0FBEF70D422B6BD588FA0@AM0PR04MB4481.eurprd04.prod.outlook.com>
Date: Fri, 13 Mar 2020 07:50:22 +0000
From: Peng Fan <peng.fan@....com>
To: Abel Vesa <abel.vesa@....com>, Rob Herring <robh@...nel.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <kernel@...gutronix.de>,
Fabio Estevam <fabio.estevam@....com>,
Mike Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Lee Jones <lee.jones@...aro.org>,
Anson Huang <anson.huang@....com>,
Leonard Crestez <leonard.crestez@....com>,
Jacky Bai <ping.bai@....com>
CC: dl-linux-imx <linux-imx@....com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
Abel Vesa <abel.vesa@....com>
Subject: RE: [RFC 05/11] clk: imx: pll14xx: Add the device as argument when
registering
> Subject: [RFC 05/11] 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 <abel.vesa@....com>
> ---
> drivers/clk/imx/clk-pll14xx.c | 6 +++---
> drivers/clk/imx/clk.h | 13 ++++++++++---
> 2 files changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index
> a83bbbe..2fbc28c 100644
> --- a/drivers/clk/imx/clk-pll14xx.c
> +++ b/drivers/clk/imx/clk-pll14xx.c
> @@ -378,9 +378,9 @@ static const struct clk_ops clk_pll1443x_ops = {
> .set_rate = clk_pll1443x_set_rate,
> };
>
> -struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char
> *parent_name,
> - void __iomem *base,
> - const struct imx_pll14xx_clk *pll_clk)
> +struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char
> *name,
> + const char *parent_name, void __iomem
> *base,
> + const struct imx_pll14xx_clk *pll_clk)
> {
Should the pointer dev be passed to clk_hw_register?
Thanks,
Peng.
> struct clk_pll14xx *pll;
> struct clk_hw *hw;
> diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index
> 51d6c26..cb28f06 100644
> --- a/drivers/clk/imx/clk.h
> +++ b/drivers/clk/imx/clk.h
> @@ -131,9 +131,9 @@ struct clk *imx_clk_pll14xx(const char *name, const
> char *parent_name, #define imx_clk_pll14xx(name, parent_name, base,
> pll_clk) \
> to_clk(imx_clk_hw_pll14xx(name, parent_name, base, pll_clk))
>
> -struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char
> *parent_name,
> - void __iomem *base,
> - const struct imx_pll14xx_clk *pll_clk);
> +struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char
> *name,
> + const char *parent_name, void __iomem
> *base,
> + const struct imx_pll14xx_clk *pll_clk);
>
> struct clk_hw *imx_clk_hw_pllv1(enum imx_pllv1_type type, const char
> *name,
> const char *parent, void __iomem *base); @@ -244,6 +244,13 @@
> static inline struct clk *to_clk(struct clk_hw *hw)
> return hw->clk;
> }
>
> +static inline struct clk_hw *imx_clk_hw_pll14xx(const char *name, const
> char *parent_name,
> + void __iomem *base,
> + const struct imx_pll14xx_clk *pll_clk) {
> + return imx_dev_clk_hw_pll14xx(NULL, name, parent_name, base,
> pll_clk);
> +}
> +
> static inline struct clk_hw *imx_clk_hw_fixed(const char *name, int rate) {
> return clk_hw_register_fixed_rate(NULL, name, NULL, 0, rate);
> --
> 2.7.4
Powered by blists - more mailing lists