Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753537AbdLNRAB (ORCPT ); Thu, 14 Dec 2017 12:00:01 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:22347 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753416AbdLNQ77 (ORCPT ); Thu, 14 Dec 2017 11:59:59 -0500 From: Olivier Moysan To: , , , , , , , , , , CC: , , Subject: [RFC PATCH 1/2] ASoC: add support of mclk clock providers in wm8894 driver 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 Content-Type: text/plain X-Originating-IP: [10.201.23.16] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-14_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1426 Lines: 55 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 -- 1.9.1