From patchwork Tue Jan 30 11:08:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10191703 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 DB196601A0 for ; Tue, 30 Jan 2018 11:08:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE7CD2899D for ; Tue, 30 Jan 2018 11:08:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0986289BD; Tue, 30 Jan 2018 11:08:59 +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, UNPARSEABLE_RELAY 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 864742899D for ; Tue, 30 Jan 2018 11:08:57 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 505A026759B; Tue, 30 Jan 2018 12:08:51 +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 29B0926759E; Tue, 30 Jan 2018 12:08:50 +0100 (CET) Received: from cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by alsa0.perex.cz (Postfix) with ESMTP id A4D6B2671F2 for ; Tue, 30 Jan 2018 12:08:46 +0100 (CET) Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23994711AbeA3LIqR1yW0 (ORCPT ); Tue, 30 Jan 2018 12:08:46 +0100 Date: Tue, 30 Jan 2018 12:08:45 +0100 From: Ladislav Michl To: alsa-devel@alsa-project.org Message-ID: <20180130110844.GD18123@lenoch> References: <20180130110604.GA18123@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180130110604.GA18123@lenoch> User-Agent: Mutt/1.9.3 (2018-01-21) Cc: Charles Keepax , Alexandre Belloni , Nicolas Ferre , Kuninori Morimoto , anish kumar Subject: [alsa-devel] [PATCH 3/7] ASoC: simple_card_utils: Set clock frequency 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 Signed-off-by: Ladislav Michl --- sound/soc/generic/simple-card-utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 3751a07de6aa..6b0cadc56933 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -185,6 +185,10 @@ int asoc_simple_card_parse_clk(struct device *dev, */ clk = devm_get_clk_from_child(dev, node, NULL); if (!IS_ERR(clk)) { + if (!of_property_read_u32(node, "clock-frequency", &val)) { + if (clk_set_rate(clk, val)) + dev_err(dev, "failed to set frequency %d\n", val); + } simple_dai->sysclk = clk_get_rate(clk); asoc_simple_card_clk_register(simple_dai, clk);