public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: broonie@kernel.org
Cc: nicolas.ferre@atmel.com, plagnioj@jcrosoft.com,
	linux-sound@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-arm-kernel@lists.infradead.org,
	Bo Shen <voice.shen@atmel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/3] ASoC: atmel_wm8904: make it available to choose clock
Date: Mon, 27 Jan 2014 06:55:25 +0000	[thread overview]
Message-ID: <1390805726-1841-3-git-send-email-voice.shen@atmel.com> (raw)
In-Reply-To: <1390805726-1841-1-git-send-email-voice.shen@atmel.com>

Make it available to choose the clock from TK pin or RK pin. This
is hardware design decided.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
Changes in v2: None

 sound/soc/atmel/atmel_wm8904.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c
index b4e3690..9346410 100644
--- a/sound/soc/atmel/atmel_wm8904.c
+++ b/sound/soc/atmel/atmel_wm8904.c
@@ -108,6 +108,7 @@ static int atmel_asoc_wm8904_dt_init(struct platform_device *pdev)
 	struct device_node *codec_np, *cpu_np;
 	struct snd_soc_card *card = &atmel_asoc_wm8904_card;
 	struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink;
+	struct atmel_ssc_info *ssc_info;
 	int ret;
 
 	if (!np) {
@@ -115,6 +116,15 @@ static int atmel_asoc_wm8904_dt_init(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+	ssc_info = devm_kzalloc(&pdev->dev, sizeof(*ssc_info), GFP_KERNEL);
+	if (!ssc_info)
+		return -ENOMEM;
+
+	ssc_info->clk_from_rk_pin +		of_property_read_bool(np, "atmel,clk-from-rk-pin");
+
+	card->drvdata = (void *)ssc_info;
+
 	ret = snd_soc_of_parse_card_name(card, "atmel,model");
 	if (ret) {
 		dev_err(&pdev->dev, "failed to parse card name\n");
-- 
1.8.5.2


  parent reply	other threads:[~2014-01-27  6:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-27  6:55 [PATCH v2 0/3] ASoC: atmel_ssc_dai: add option to choose clock Bo Shen
2014-01-27  6:55 ` [PATCH v2 1/3] ASoC: atmel_ssc_dai: make " Bo Shen
2014-01-27  7:06   ` [alsa-devel] " Lars-Peter Clausen
2014-01-27  6:55 ` Bo Shen [this message]
2014-01-27  6:55 ` [PATCH v2 3/3] Binding: atmel-wm8904: add " Bo Shen
2014-01-27 19:31   ` Mark Brown

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=1390805726-1841-3-git-send-email-voice.shen@atmel.com \
    --to=voice.shen@atmel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=perex@perex.cz \
    --cc=plagnioj@jcrosoft.com \
    --cc=tiwai@suse.de \
    --cc=wsa@the-dreams.de \
    /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