[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <159070699457.69627.14852370592791335742@swboyd.mtv.corp.google.com>
Date: Thu, 28 May 2020 16:03:14 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: add api to get clk consummer from clk_hw
Quoting Jerome Brunet (2020-05-28 11:58:45)
>
> On Wed 27 May 2020 at 22:07, Martin Blumenstingl <martin.blumenstingl@...glemail.com> wrote:
>
> > Hi Jerome,
> >
> > On Tue, May 19, 2020 at 7:09 PM Jerome Brunet <jbrunet@...libre.com> wrote:
> > [...]
> >> + * Calls to this function must be balanced with calls clk_put()
> >> + */
> >> +struct clk *clk_hw_get_clk(struct clk_hw *hw)
> > I haven't looked at it myself yet, but would it be hard to have a
> > devm_ variant of this function as well?
>
> Seems easy enough.
> Stephen is this OK with you ?
>
> I'm just wondering if this devm_ function should use the device pointer
> embedded in the clk_hw structure or have it as an argument ?
>
> The 1st option seems simpler but I'm not sure it is correct.
>
> Thoughts ?
>
devm API sounds OK to me. For now we can use the one embedded in the
clk_hw structure and if we have to we can replace it with the one that
the caller passes in. Hopefully we never need to do that because then it
means we have drivers passing around clk_hw pointers instead of having
the caller use proper clk_get() style APIs.
Powered by blists - more mailing lists