mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: add api to get clk consummer from clk_hw
Date: Thu, 28 May 2020 20:58:45 +0200	[thread overview]
Message-ID: <1j8shbkhsq.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <CAFBinCBXTwKz81bQK3U1bv7vGiryhShijqh2hqaypPvLopvwNA@mail.gmail.com>


On Wed 27 May 2020 at 22:07, Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:

> Hi Jerome,
>
> On Tue, May 19, 2020 at 7:09 PM Jerome Brunet <jbrunet@baylibre.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 ?

> a non-devm managed function would add boilerplate to the meson-mx-sdhc-mmc code
>
> also this may or may not simplify how to fetch the struct device
> pointer for this use-case.
> (that said, I only know about drivers for Amlogic related IP and there
> the devm_ variant can be used, but I don't know about other potential
> consumers of this new API)
>
>
> Thank you!
> Martin


  reply	other threads:[~2020-05-28 18:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 17:04 Jerome Brunet
2020-05-27  9:17 ` Stephen Boyd
2020-05-28 18:50   ` Jerome Brunet
2020-05-27 20:07 ` Martin Blumenstingl
2020-05-28 18:58   ` Jerome Brunet [this message]
2020-05-28 23:03     ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1j8shbkhsq.fsf@starbuckisacylon.baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®