Linux-Clk Archive on lore.kernel.org
 help / color / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Jerome Brunet <jbrunet@baylibre.com>,
	Michael Turquette <mturquette@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH RFC 4/5] clk: add placeholder for clock internal data
Date: Wed, 28 Aug 2019 15:15:28 -0700
Message-ID: <20190828221529.026C522DA7@mail.kernel.org> (raw)
In-Reply-To: <20190828102012.4493-5-jbrunet@baylibre.com>

Quoting Jerome Brunet (2019-08-28 03:20:11)
> Add placeholder in clock core to save per clock data.
> Such placeholder could use for clock doing memory allocation in .init().
> It may also be useful for the save/restore_context() callbacks.
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  drivers/clk/clk.c            | 13 +++++++++++++
>  include/linux/clk-provider.h |  2 ++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index c703aa35ca37..aa77a2a98ea4 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -83,6 +83,7 @@ struct clk_core {
>         struct hlist_node       debug_node;
>  #endif
>         struct kref             ref;
> +       void                    *priv;

Why? We have container structures around clk_hw that can be used to
store data and clk_ops that should know to deref said clk_hw pointer in
some way to access that data.

  reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 10:20 [PATCH RFC 0/5] clk: let clock claim resources Jerome Brunet
2019-08-28 10:20 ` [PATCH RFC 1/5] clk: actually call the clock init before any other callback of the clock Jerome Brunet
2019-08-28 10:20 ` [PATCH RFC 2/5] clk: let init callback return an error code Jerome Brunet
2019-08-28 10:20 ` [PATCH RFC 3/5] clk: add terminate callback to clk_ops Jerome Brunet
2019-08-28 10:20 ` [PATCH RFC 4/5] clk: add placeholder for clock internal data Jerome Brunet
2019-08-28 22:15   ` Stephen Boyd [this message]
2019-08-29  7:20     ` Jerome Brunet
2019-08-29 17:17       ` Stephen Boyd
2019-08-30 14:06         ` Jerome Brunet
2019-09-04 22:52           ` Stephen Boyd
2019-08-28 10:20 ` [PATCH RFC 5/5] clk: meson: sclk-div: use runtime data Jerome Brunet

Reply instructions:

You may reply publically 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=20190828221529.026C522DA7@mail.kernel.org \
    --to=sboyd@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    /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

Linux-Clk Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \
		linux-clk@vger.kernel.org linux-clk@archiver.kernel.org
	public-inbox-index linux-clk

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk


AGPL code for this site: git clone https://public-inbox.org/ public-inbox