All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Fuzzey <mfuzzey@parkeon.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, linux-mmc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: pwrseq_simple: Support assigned-clocks
Date: Fri, 08 Jan 2016 10:59:17 +0100	[thread overview]
Message-ID: <20160108095917.32335.11094.stgit@localhost> (raw)

The clock subsystem now allows clock rates and parents to be configured
in the device tree.

This requires calling of_clk_set_defaults() which is done automatically
for platform, i2c, spi devices. Since pwrseq_simple does not fit into
those catagories we must do it ourself.

With this patch the standard assigned-clocks, assigned-clock-rates,
assigned-clock-parents DT properties to be used in pwrseq_simple nodes.

Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
---
 drivers/mmc/core/pwrseq_simple.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c
index 4d2962b..fd8f38e 100644
--- a/drivers/mmc/core/pwrseq_simple.c
+++ b/drivers/mmc/core/pwrseq_simple.c
@@ -8,6 +8,7 @@
  *  Simple MMC power sequence management
  */
 #include <linux/clk.h>
+#include <linux/clk/clk-conf.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/device.h>
@@ -108,6 +109,10 @@ struct mmc_pwrseq *mmc_pwrseq_simple_alloc(struct mmc_host *host,
 	if (!pwrseq)
 		return ERR_PTR(-ENOMEM);
 
+	ret = of_clk_set_defaults(dev->of_node, false);
+	if (ret)
+		goto free;
+
 	pwrseq->ext_clk = clk_get(dev, "ext_clock");
 	if (IS_ERR(pwrseq->ext_clk) &&
 	    PTR_ERR(pwrseq->ext_clk) != -ENOENT) {


WARNING: multiple messages have this Message-ID (diff)
From: mfuzzey@parkeon.com (Martin Fuzzey)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: pwrseq_simple: Support assigned-clocks
Date: Fri, 08 Jan 2016 10:59:17 +0100	[thread overview]
Message-ID: <20160108095917.32335.11094.stgit@localhost> (raw)

The clock subsystem now allows clock rates and parents to be configured
in the device tree.

This requires calling of_clk_set_defaults() which is done automatically
for platform, i2c, spi devices. Since pwrseq_simple does not fit into
those catagories we must do it ourself.

With this patch the standard assigned-clocks, assigned-clock-rates,
assigned-clock-parents DT properties to be used in pwrseq_simple nodes.

Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
---
 drivers/mmc/core/pwrseq_simple.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c
index 4d2962b..fd8f38e 100644
--- a/drivers/mmc/core/pwrseq_simple.c
+++ b/drivers/mmc/core/pwrseq_simple.c
@@ -8,6 +8,7 @@
  *  Simple MMC power sequence management
  */
 #include <linux/clk.h>
+#include <linux/clk/clk-conf.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/device.h>
@@ -108,6 +109,10 @@ struct mmc_pwrseq *mmc_pwrseq_simple_alloc(struct mmc_host *host,
 	if (!pwrseq)
 		return ERR_PTR(-ENOMEM);
 
+	ret = of_clk_set_defaults(dev->of_node, false);
+	if (ret)
+		goto free;
+
 	pwrseq->ext_clk = clk_get(dev, "ext_clock");
 	if (IS_ERR(pwrseq->ext_clk) &&
 	    PTR_ERR(pwrseq->ext_clk) != -ENOENT) {

             reply	other threads:[~2016-01-08  9:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08  9:59 Martin Fuzzey [this message]
2016-01-08  9:59 ` [PATCH] mmc: pwrseq_simple: Support assigned-clocks Martin Fuzzey
2016-01-27 14:15 ` Ulf Hansson
2016-01-27 14:15   ` Ulf Hansson

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=20160108095917.32335.11094.stgit@localhost \
    --to=mfuzzey@parkeon.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@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.