From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] clk: add extension API
Date: Wed, 30 May 2012 14:58:23 +0530 [thread overview]
Message-ID: <4FC5E837.30702@ti.com> (raw)
In-Reply-To: <1338285540-24407-1-git-send-email-pdeschrijver@nvidia.com>
Hi Peter,
On Tuesday 29 May 2012 03:28 PM, Peter De Schrijver wrote:
> Add an extension API for clocks. This allows clocktypes to provide extensions
> for features which are uncommon and cannot be easily mapped onto normal clock
> framework concecpts. eg: resetting blocks, configuring clock phase etc.
I was thinking on similar lines for OMAP wherein I need to control
'hardware-auto-gating' bits on clocks which are otherwise just normal
gates or dividers. We just disable all of them early at boot and
re-enable them late in the boot process once PM kicks in.
regards,
Rajendra
>
> Signed-off-by: Peter De Schrijver<pdeschrijver@nvidia.com>
> ---
> drivers/clk/clk.c | 8 ++++++++
> include/linux/clk-provider.h | 2 ++
> include/linux/clk.h | 2 ++
> 3 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index e5d5dc1..39bc458 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -956,6 +956,14 @@ struct clk *clk_get_parent(struct clk *clk)
> }
> EXPORT_SYMBOL_GPL(clk_get_parent);
>
> +int clk_ext(struct clk *clk, unsigned int op, unsigned long param)
> +{
> + if (clk->ops->ext)
> + return clk->ops->ext(clk->hw, op, param);
> +
> + return -EINVAL;
> +}
> +
> /*
> * .get_parent is mandatory for clocks with multiple possible parents. It is
> * optional for single-parent clocks. Always call .get_parent if it is
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index 6803fb4..08025d3 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -109,6 +109,8 @@ struct clk_ops {
> int (*set_rate)(struct clk_hw *hw, unsigned long,
> unsigned long);
> void (*init)(struct clk_hw *hw);
> + int (*ext)(struct clk_hw *hw, unsigned int op,
> + unsigned long param);
> };
>
> /**
> diff --git a/include/linux/clk.h b/include/linux/clk.h
> index 0e078bd..74be656 100644
> --- a/include/linux/clk.h
> +++ b/include/linux/clk.h
> @@ -278,4 +278,6 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id);
> int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
> struct device *dev);
>
> +int clk_ext(struct clk *clk, unsigned int op, unsigned long param);
> +
> #endif
next prev parent reply other threads:[~2012-05-30 9:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 9:58 [RFC PATCH] clk: add extension API Peter De Schrijver
2012-05-30 8:52 ` Stephen Boyd
2012-05-30 19:40 ` Mike Turquette
2012-05-30 20:28 ` Stephen Boyd
2012-05-31 19:09 ` Mike Turquette
2012-05-31 3:29 ` Saravana Kannan
2012-05-31 8:23 ` Peter De Schrijver
2012-05-31 21:12 ` Saravana Kannan
2012-05-31 7:51 ` Peter De Schrijver
2012-05-31 8:18 ` Felipe Balbi
2012-05-31 8:31 ` Peter De Schrijver
2012-05-31 8:54 ` Felipe Balbi
2012-05-31 9:05 ` Peter De Schrijver
2012-05-31 9:26 ` Felipe Balbi
2012-05-31 9:43 ` Peter De Schrijver
2012-05-31 9:46 ` Felipe Balbi
2012-05-31 9:57 ` Peter De Schrijver
2012-05-31 10:01 ` Felipe Balbi
2012-05-31 12:50 ` Cousson, Benoit
2012-05-31 13:04 ` Mark Brown
2012-05-31 13:07 ` Cousson, Benoit
2012-05-31 13:11 ` Mark Brown
2012-05-31 12:00 ` Mark Brown
2012-05-31 9:04 ` Stephen Boyd
2012-05-31 9:10 ` Peter De Schrijver
2012-05-30 9:28 ` Rajendra Nayak [this message]
2012-05-31 19:19 ` Mike Turquette
2012-06-06 12:07 ` Peter De Schrijver
2012-05-31 16:42 ` Stephen Warren
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=4FC5E837.30702@ti.com \
--to=rnayak@ti.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).