linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: olivier.moysan@st.com (Olivier Moysan)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/2] ASoC: add support of mclk clock providers in wm8894 driver
Date: Thu, 14 Dec 2017 17:53:57 +0100	[thread overview]
Message-ID: <1513270438-18523-2-git-send-email-olivier.moysan@st.com> (raw)
In-Reply-To: <1513270438-18523-1-git-send-email-olivier.moysan@st.com>

Wolfson wm8994 codec bindings exposes MCLK1 and MCLK1 clocks.
This patch adds support of MCLK1 and MCLK2 in mfd driver.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
---
 drivers/mfd/wm8994-core.c        | 9 +++++++++
 include/linux/mfd/wm8994/pdata.h | 6 ++++++
 2 files changed, 15 insertions(+)

diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index 953d079..f1ff9d8 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -12,6 +12,7 @@
  *
  */
 
+#include <linux/clk.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/slab.h>
@@ -310,6 +311,14 @@ static int wm8994_set_pdata_from_of(struct wm8994 *wm8994)
 	if (pdata->ldo[1].enable < 0)
 		pdata->ldo[1].enable = 0;
 
+	pdata->mclk1 = devm_clk_get(wm8994->dev, "MCLK1");
+	if (IS_ERR(pdata->mclk1))
+		pdata->mclk1 = NULL;
+
+	pdata->mclk2 = devm_clk_get(wm8994->dev, "MCLK2");
+	if (IS_ERR(pdata->mclk2))
+		pdata->mclk2 = NULL;
+
 	return 0;
 }
 #else
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h
index 90c6052..8037d26 100644
--- a/include/linux/mfd/wm8994/pdata.h
+++ b/include/linux/mfd/wm8994/pdata.h
@@ -233,6 +233,12 @@ struct wm8994_pdata {
 	 * GPIO for the IRQ pin if host only supports edge triggering
 	 */
 	int irq_gpio;
+
+	/* MCLK1 clock provider */
+	struct clk *mclk1;
+
+	/* MCLK2 clock provider */
+	struct clk *mclk2;
 };
 
 #endif
-- 
1.9.1

  reply	other threads:[~2017-12-14 16:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 16:53 [RFC PATCH 0/2] select master clock in wm8994 driver based on DT clocks configuration Olivier Moysan
2017-12-14 16:53 ` Olivier Moysan [this message]
     [not found]   ` <20171214173025.GL9788@sirena.org.uk>
2017-12-15 11:51     ` [RFC PATCH 1/2] ASoC: add support of mclk clock providers in wm8894 driver Charles Keepax
2017-12-14 16:53 ` [RFC PATCH 2/2] ASoC: select sysclk clock from mlck clock provider in wm8994 driver Olivier Moysan
     [not found]   ` <20171214173624.GM9788@sirena.org.uk>
2017-12-15 11:46     ` Charles Keepax
2017-12-15 15:15     ` Olivier MOYSAN
2017-12-19  9:35       ` Mark Brown
2017-12-20 12:42         ` Olivier MOYSAN
     [not found]           ` <20171220155000.GD17890@sirena.org.uk>
2017-12-21 10:51             ` Olivier MOYSAN

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=1513270438-18523-2-git-send-email-olivier.moysan@st.com \
    --to=olivier.moysan@st.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).