From patchwork Thu Dec 14 16:53:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier MOYSAN X-Patchwork-Id: 10112733 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 02F8460327 for ; Thu, 14 Dec 2017 16:56:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E88D329953 for ; Thu, 14 Dec 2017 16:56:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBF5A29C78; Thu, 14 Dec 2017 16:56:27 +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=ham 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 E7B6829953 for ; Thu, 14 Dec 2017 16:56:26 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 73189267AEE; Thu, 14 Dec 2017 17:56:22 +0100 (CET) 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 1E2A9267AF2; Thu, 14 Dec 2017 17:56:21 +0100 (CET) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [62.209.51.94]) by alsa0.perex.cz (Postfix) with ESMTP id B5A38267AEE for ; Thu, 14 Dec 2017 17:56:18 +0100 (CET) Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vBEGsOQb010671; Thu, 14 Dec 2017 17:56:18 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2eusp0sb6n-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 14 Dec 2017 17:56:18 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 75D1538; Thu, 14 Dec 2017 16:56:15 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3430D2B6C; Thu, 14 Dec 2017 16:56:15 +0000 (GMT) Received: from SAFEX1HUBCAS21.st.com (10.75.90.44) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 14 Dec 2017 17:56:14 +0100 Received: from localhost (10.201.23.16) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 14 Dec 2017 17:56:14 +0100 From: Olivier Moysan To: , , , , , , , , , , Date: Thu, 14 Dec 2017 17:53:57 +0100 Message-ID: <1513270438-18523-2-git-send-email-olivier.moysan@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1513270438-18523-1-git-send-email-olivier.moysan@st.com> References: <1513270438-18523-1-git-send-email-olivier.moysan@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.16] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-12-14_10:, , signatures=0 Cc: patches@opensource.wolfsonmicro.com, arnaud.pouliquen@st.com, benjamin.gaignard@st.com Subject: [alsa-devel] [RFC PATCH 1/2] ASoC: add support of mclk clock providers in wm8894 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 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 --- 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 #include #include #include @@ -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