From patchwork Tue Jan 14 03:25:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Shen X-Patchwork-Id: 3483801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C0F129F169 for ; Tue, 14 Jan 2014 03:29:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01DEC20161 for ; Tue, 14 Jan 2014 03:29:26 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0869720160 for ; Tue, 14 Jan 2014 03:29:25 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W2ug2-0002n0-8s; Tue, 14 Jan 2014 03:28:30 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W2ufp-0006oY-RT; Tue, 14 Jan 2014 03:28:17 +0000 Received: from newsmtp5.atmel.com ([204.2.163.5] helo=sjogate2.atmel.com) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W2ufT-0006l6-Bf for linux-arm-kernel@lists.infradead.org; Tue, 14 Jan 2014 03:27:57 +0000 Received: from Dev4Android.corp.atmel.com ([10.217.2.46]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id s0E3Isto013915; Mon, 13 Jan 2014 19:20:32 -0800 (PST) From: Bo Shen To: broonie@kernel.org Subject: [PATCH 2/3] ASoC: atmel_wm8904: make it available to choose clock Date: Tue, 14 Jan 2014 11:25:55 +0800 Message-Id: <1389669956-2304-3-git-send-email-voice.shen@atmel.com> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1389669956-2304-1-git-send-email-voice.shen@atmel.com> References: <1389669956-2304-1-git-send-email-voice.shen@atmel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140113_222755_644072_4FFA1BB8 X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: alsa-devel@alsa-project.org, Wolfram Sang , Takashi Iwai , linux-kernel@vger.kernel.org, Linus Walleij , nicolas.ferre@atmel.com, Liam Girdwood , linux-sound@vger.kernel.org, Jaroslav Kysela , Bo Shen , plagnioj@jcrosoft.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make it available to choose the clock from TK pin or RK pin. This is hardware design decided. Signed-off-by: Bo Shen --- 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..b85088d 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, "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");