From patchwork Mon Aug 8 14:35:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 9269207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 710D3607D6 for ; Mon, 8 Aug 2016 19:12:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EB0E27F95 for ; Mon, 8 Aug 2016 19:12:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5168C27FE4; Mon, 8 Aug 2016 19:12:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A26527F95 for ; Mon, 8 Aug 2016 19:12:05 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7D0C0266C6D; Mon, 8 Aug 2016 21:12:04 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 54347266DE3; Mon, 8 Aug 2016 19:47:52 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 36A6126926A; Mon, 8 Aug 2016 19:47:50 +0200 (CEST) Received: from mail1.bemta14.messagelabs.com (mail1.bemta14.messagelabs.com [193.109.254.107]) by alsa0.perex.cz (Postfix) with ESMTP id 61DFC266DDE for ; Mon, 8 Aug 2016 16:35:25 +0200 (CEST) Received: from [85.158.140.211] by server-3.bemta-14.messagelabs.com id C8/E0-29440-CA898A75; Mon, 08 Aug 2016 14:35:24 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKIsWRWlGSWpSXmKPExsUSt3Opse6aGSv CDU5+lbG4cvEQk8XUh0/YLL5d6WCyuLxrDptF565+VosN39cyOrB5bPjcxOaxc9Zddo9NqzrZ PPa9XcbmsX7LVRaPz5vkAtiiWDPzkvIrElgzXh19z1qwTKjiQdMdpgbGw/xdjFwcQgLrGCX+v z/A2sXICeRUSEzcsZCti5GDg1cgU+LJxjiQMKeAu8Tqn1uYQMJCAm4S386VgoTZBCwkJp94wA ZiswioSLz7tYYdxBYWcJFYtK2BEWS8iEAXo8TqV4/BEswC5RJbPk1kBrF5BQQlTs58wgIRl5A 4+OIFM8QJBhKnFzSCxSUE7CWmv7/KDLJXQkBfovFYLETYUOL7rG9QJeYSS5fuY5zAKDgLydRZ SKYuYGRaxahRnFpUllqka2Spl1SUmZ5RkpuYmaNraGiil5taXJyYnpqTmFSsl5yfu4kRGPz1D AyMOxh3Hfc7xCjJwaQkyis/dUW4EF9SfkplRmJxRnxRaU5q8SFGGQ4OJQneyOlAOcGi1PTUir TMHGAcwqQlOHiURHgngqR5iwsSc4sz0yFSpxgVpcR5lUESAiCJjNI8uDZY7F9ilJUS5mVkYGA Q4ilILcrNLEGVf8UozsGoJMw7H2QKT2ZeCdz0V0CLmYAWJ6mCLS5JREhJNTDG8p1av/jVOjar 4rl7JFu07RT9Ulq1slOseNX7fpbdak2z2nne+VfI+l+Gu22XpUSvKLAvWcC0SyljbZt5x7XVj /8pXVr4RWSq66cHb15cKuO+cFnmUse1jIOP9+q2vM5b09hadT5nVpMlb4RZ7ILszk19p43Y7n MVrz9VfmLmpGsd5x46vZmhxFKckWioxVxUnAgA2gfN4vgCAAA= X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-4.tower-194.messagelabs.com!1470666923!52242064!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26841 invoked from network); 8 Aug 2016 14:35:24 -0000 Received: from mailrelay2.diasemi.com (HELO sw-ex-cashub01.diasemi.com) (94.185.165.51) by server-4.tower-194.messagelabs.com with AES128-SHA encrypted SMTP; 8 Aug 2016 14:35:24 -0000 Received: from swsrvapps-01.diasemi.com (10.20.28.141) by SW-EX-CASHUB01.diasemi.com (10.20.16.140) with Microsoft SMTP Server id 14.3.248.2; Mon, 8 Aug 2016 15:35:23 +0100 Received: by swsrvapps-01.diasemi.com (Postfix, from userid 22379) id 84D523FBE3; Mon, 8 Aug 2016 15:35:23 +0100 (BST) Message-ID: In-Reply-To: References: From: Adam Thomson Date: Mon, 8 Aug 2016 15:35:23 +0100 To: Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai MIME-Version: 1.0 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-ServerInfo: sw-ex-cashub01.diasemi.com, 9 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 08/08/2016 08:46:00 Cc: alsa-devel@alsa-project.org, Support Opensource , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH 1/2] ASoC: da7218: Remove 32KHz PLL mode from driver X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Functionality has been removed in latest silicon variants. This patch removes the feature from the driver to align. Signed-off-by: Adam Thomson --- sound/soc/codecs/da7218.c | 12 +++--------- sound/soc/codecs/da7218.h | 2 -- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/da7218.c b/sound/soc/codecs/da7218.c index 99ce23e..f443519 100644 --- a/sound/soc/codecs/da7218.c +++ b/sound/soc/codecs/da7218.c @@ -1819,7 +1819,7 @@ static int da7218_set_dai_sysclk(struct snd_soc_dai *codec_dai, if (da7218->mclk_rate == freq) return 0; - if (((freq < 2000000) && (freq != 32768)) || (freq > 54000000)) { + if ((freq < 2000000) || (freq > 54000000)) { dev_err(codec_dai->dev, "Unsupported MCLK value %d\n", freq); return -EINVAL; @@ -1866,11 +1866,8 @@ static int da7218_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, u32 freq_ref; u64 frac_div; - /* Verify 32KHz, 2MHz - 54MHz MCLK provided, and set input divider */ - if (da7218->mclk_rate == 32768) { - indiv_bits = DA7218_PLL_INDIV_9_TO_18_MHZ; - indiv = DA7218_PLL_INDIV_9_TO_18_MHZ_VAL; - } else if (da7218->mclk_rate < 2000000) { + /* Verify 2MHz - 54MHz MCLK provided, and set input divider */ + if (da7218->mclk_rate < 2000000) { dev_err(codec->dev, "PLL input clock %d below valid range\n", da7218->mclk_rate); return -EINVAL; @@ -1911,9 +1908,6 @@ static int da7218_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, case DA7218_SYSCLK_PLL_SRM: pll_ctrl |= DA7218_PLL_MODE_SRM; break; - case DA7218_SYSCLK_PLL_32KHZ: - pll_ctrl |= DA7218_PLL_MODE_32KHZ; - break; default: dev_err(codec->dev, "Invalid PLL config\n"); return -EINVAL; diff --git a/sound/soc/codecs/da7218.h b/sound/soc/codecs/da7218.h index 477cd37..4f7ec21 100644 --- a/sound/soc/codecs/da7218.h +++ b/sound/soc/codecs/da7218.h @@ -888,7 +888,6 @@ #define DA7218_PLL_MODE_BYPASS (0x0 << 6) #define DA7218_PLL_MODE_NORMAL (0x1 << 6) #define DA7218_PLL_MODE_SRM (0x2 << 6) -#define DA7218_PLL_MODE_32KHZ (0x3 << 6) /* DA7218_PLL_FRAC_TOP = 0x92 */ #define DA7218_PLL_FBDIV_FRAC_TOP_SHIFT 0 @@ -1371,7 +1370,6 @@ enum da7218_sys_clk { DA7218_SYSCLK_MCLK = 0, DA7218_SYSCLK_PLL, DA7218_SYSCLK_PLL_SRM, - DA7218_SYSCLK_PLL_32KHZ }; enum da7218_dev_id {