From: Grant Likely <grant.likely@secretlab.ca>
To: devicetree-discuss@lists.ozlabs.org, jeremy.kerr@canonical.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: nicolas.pitre@linaro.org
Subject: [RFC PATCH 4/5] arm/clkdev: lookup clocks from OF clock providers
Date: Tue, 25 Jan 2011 21:44:22 -0700 [thread overview]
Message-ID: <20110126044422.16410.78703.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110126043338.16410.75019.stgit@localhost6.localdomain6>
From: Jeremy Kerr <jeremy.kerr@canonical.com>
Hook the OF clock provider infrastructure to clk_get.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/clk/clkdev.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 0fc0a79..a546763 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -19,6 +19,8 @@
#include <linux/mutex.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
+#include <linux/of.h>
+#include <linux/of_clk.h>
static LIST_HEAD(clocks);
static DEFINE_MUTEX(clocks_mutex);
@@ -79,6 +81,11 @@ EXPORT_SYMBOL(clk_get_sys);
struct clk *clk_get(struct device *dev, const char *con_id)
{
const char *dev_id = dev ? dev_name(dev) : NULL;
+ struct clk *clk;
+
+ clk = of_clk_get(dev, con_id);
+ if (clk && __clk_get(clk))
+ return clk;
return clk_get_sys(dev_id, con_id);
}
WARNING: multiple messages have this Message-ID (diff)
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: [RFC PATCH 4/5] arm/clkdev: lookup clocks from OF clock providers
Date: Tue, 25 Jan 2011 21:44:22 -0700 [thread overview]
Message-ID: <20110126044422.16410.78703.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110126043338.16410.75019.stgit-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>
From: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Hook the OF clock provider infrastructure to clk_get.
Signed-off-by: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
drivers/clk/clkdev.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 0fc0a79..a546763 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -19,6 +19,8 @@
#include <linux/mutex.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
+#include <linux/of.h>
+#include <linux/of_clk.h>
static LIST_HEAD(clocks);
static DEFINE_MUTEX(clocks_mutex);
@@ -79,6 +81,11 @@ EXPORT_SYMBOL(clk_get_sys);
struct clk *clk_get(struct device *dev, const char *con_id)
{
const char *dev_id = dev ? dev_name(dev) : NULL;
+ struct clk *clk;
+
+ clk = of_clk_get(dev, con_id);
+ if (clk && __clk_get(clk))
+ return clk;
return clk_get_sys(dev_id, con_id);
}
WARNING: multiple messages have this Message-ID (diff)
From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 4/5] arm/clkdev: lookup clocks from OF clock providers
Date: Tue, 25 Jan 2011 21:44:22 -0700 [thread overview]
Message-ID: <20110126044422.16410.78703.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110126043338.16410.75019.stgit@localhost6.localdomain6>
From: Jeremy Kerr <jeremy.kerr@canonical.com>
Hook the OF clock provider infrastructure to clk_get.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/clk/clkdev.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 0fc0a79..a546763 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -19,6 +19,8 @@
#include <linux/mutex.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
+#include <linux/of.h>
+#include <linux/of_clk.h>
static LIST_HEAD(clocks);
static DEFINE_MUTEX(clocks_mutex);
@@ -79,6 +81,11 @@ EXPORT_SYMBOL(clk_get_sys);
struct clk *clk_get(struct device *dev, const char *con_id)
{
const char *dev_id = dev ? dev_name(dev) : NULL;
+ struct clk *clk;
+
+ clk = of_clk_get(dev, con_id);
+ if (clk && __clk_get(clk))
+ return clk;
return clk_get_sys(dev_id, con_id);
}
next prev parent reply other threads:[~2011-01-26 4:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 4:44 [RFC PATCH 0/5] arm/dt: register devices from device tree Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 4:44 ` [RFC PATCH 1/5] arm/dt: Add dt machine definition Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 18:27 ` [RFC,1/5] " Milton Miller
2011-01-26 18:27 ` Milton Miller
2011-01-27 3:31 ` Grant Likely
2011-01-26 4:44 ` [RFC PATCH 2/5] drivers/amba: probe via device tree Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 4:44 ` [RFC PATCH 3/5] of: add clock providers Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 5:47 ` Paul Mundt
2011-01-26 5:47 ` Paul Mundt
2011-02-01 22:42 ` Rob Herring
2011-02-01 22:42 ` Rob Herring
2011-01-26 4:44 ` Grant Likely [this message]
2011-01-26 4:44 ` [RFC PATCH 4/5] arm/clkdev: lookup clocks from OF " Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 4:44 ` [RFC PATCH 5/5] arm/versatile: add a device tree versatile platform Grant Likely
2011-01-26 4:44 ` Grant Likely
2011-01-26 4:44 ` Grant Likely
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=20110126044422.16410.78703.stgit@localhost6.localdomain6 \
--to=grant.likely@secretlab.ca \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=jeremy.kerr@canonical.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.pitre@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.