Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3356093pxb; Mon, 17 Jan 2022 18:27:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDk3nxNkvBxalBIXJd03z2FPrszpTc55kxuva2Fzu20eYgcKdBNCtlCI6LDluSO8jG4cYw X-Received: by 2002:a63:cc48:: with SMTP id q8mr4202466pgi.474.1642472840484; Mon, 17 Jan 2022 18:27:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642472840; cv=none; d=google.com; s=arc-20160816; b=WfLb69W9Wfn8qTgYYS05vgsOo0ejjcL0dYj44Pha1UnCoiTyQHEDXCmM8rx3jvldca aUoEm2cGJG8uBrJupA1IKZBPBXbDEmC77+FquU9q0aPKf6VgLEmOUMS/jPpv1CPyDLv1 7qfQKnPLm9+Kvana9vU8rQ3IQsb5wsIyRoVlBvCs9xLZA3j/97/1p+38WKB2Z6ls2vqM g5rYU8ghi0qZlFegtKhyPWC8DLTL9E9ZdexBds2MqfOEA+FXtQYJcsH+2DKLQuinovxW hkBHHX+uMNZgWjkGqY656eDXBWcGC+hGjCXgjJNp/B/UdxkI1v/8te9vBwXsaQY2wstV 5LJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3Zwg6AbXXfgM9/tp8FepmqHGqTaX3SdOeh1jEMBzLvo=; b=SrlzLZiXt/G5YdPtMPscesINaHzpv5HVqJ6coJlcNynFvMBG2KUkCe5vCRxJpXEb8a CoRGQDXY1P3s6dR1/loqiS6zesNw7+OmnNAgipEbba6Zuub733WQX1B3xZotB6PIShVI coYXh1xGSD1o4yBiwt0NtllRWpjEseU7vluRXDhnSHfN1kQj6N2uz/stPN5zBj1su4TE j/VEvOqrPQQVXUT4fwGq6DX1z2NIDGIQ7hcTm968ixls8pG4PQnvfaMgUEY8a2NXDpQ6 VCpg/ZKknUqkg6vD7xyQTgg6uEcZw77UVZWKkjJFswSpFCvxYpE0EOb701WDV/STq0lF q4qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YPyLSGZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si16249650plr.168.2022.01.17.18.27.08; Mon, 17 Jan 2022 18:27:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YPyLSGZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236113AbiAQNVy (ORCPT + 99 others); Mon, 17 Jan 2022 08:21:54 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:52952 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231745AbiAQNVv (ORCPT ); Mon, 17 Jan 2022 08:21:51 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: adalessandro) with ESMTPSA id B7ED71F439D4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642425710; bh=jVy2ZoyycuiS4S7ICSr7v6N/6BqeqbOkelv81GUI3Eo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YPyLSGZVQCMiiyR4gGxztKCKj8+YvXGtun60zrrNLm87nWT7qB9prTaf/CZOSJ5PP mKshbaLW+kQe7J0Uyu2lVBIIGgsFbSOEHK3+i4ZVo3Li7o3gZyfRUfr+Zr/GN3put2 EKgBW9J5ZjCWUs+DM0Yy5tKyZQGCAwgtJWE1YFKAX2dqrIk77PLflVB1ZK40UokjGZ N2uWzTgIVxQ7xg40oC/8N54ZjaYq1FjF6x10YP8QXWHV9ZJh45XgY5uCfwBqQlQ07j +sULxKH1xX54SvzS0YMQUyZnJHOToDlf/KExChYbIpdagVwjwoTq0qrunGl1OGwct6 UDAGtTCob1yCA== From: Ariel D'Alessandro To: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Xiubo.Lee@gmail.com, ariel.dalessandro@collabora.com, bcousson@baylibre.com, broonie@kernel.org, festevam@gmail.com, kuninori.morimoto.gx@renesas.com, lgirdwood@gmail.com, michael@amarulasolutions.com, nicoleotsuka@gmail.com, perex@perex.cz, robh+dt@kernel.org, shengjiu.wang@gmail.com, tiwai@suse.com, tony@atomide.com Subject: [PATCH v2 4/5] ASoC: fsl-asoc-card: Add optional dt property for setting mclk-id Date: Mon, 17 Jan 2022 10:21:08 -0300 Message-Id: <20220117132109.283365-5-ariel.dalessandro@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220117132109.283365-1-ariel.dalessandro@collabora.com> References: <20220117132109.283365-1-ariel.dalessandro@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sound cards may allow using different main clock inputs. In the generic fsl-asoc-card driver, these values are hardcoded for each specific card configuration. Let's make it more flexible, allowing setting mclk-id from the device-tree node. Otherwise, the default value for each card configuration is used. Signed-off-by: Ariel D'Alessandro --- sound/soc/fsl/fsl-asoc-card.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 5ee945505281..156d3c669274 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -693,6 +693,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) goto asrc_fail; } + /* + * Allow setting mclk-id from the device-tree node. Otherwise, the + * default value for each card configuration is used. + */ + of_property_read_u32(np, "mclk-id", &priv->codec_priv.mclk_id); + /* Format info from DT is optional. */ snd_soc_daifmt_parse_clock_provider_as_phandle(np, NULL, &bitclkprovider, &frameprovider); if (bitclkprovider || frameprovider) { -- 2.34.1