Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4623707pxu; Wed, 21 Oct 2020 00:40:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiLortyNDOL4k9l7tRFUOmtMM9eda8VHbNfoOaRhUT3zpzvsa8MqbMoGXIKwXr7FIicMlL X-Received: by 2002:a17:907:42fd:: with SMTP id oa21mr2078775ejb.247.1603266008527; Wed, 21 Oct 2020 00:40:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603266008; cv=none; d=google.com; s=arc-20160816; b=ulH5CAFY70ZCswtJ9aI1WjOWoffQiacVX9q1LKGhaH6hfXjIVEdAFVhC3DDrXuj0X1 TXbpR6r2mHccgZX7xQZA6XTiCVHT9jyau+9pO64I0YDJoquS+z6CvbaWtlxrcQuKCmtm 8Z3NCFzm65SCavecjVFuRaKioA1lQCNw31LTs8SZTOpxYWCd3m845OpQsjrVDq7BF+gX K/2iCTgVF8UePNYwN+kv3T2LlN5jEnfjlS4nOkj9gDRkWg1av/WAD+BI2EhqN3gX8QcP aTfTP+zrI9yW/i0/CP1m2VhsqcI0a93MJ2bnSFs9nKEECk7tHsb77sETgOw+ET/3/kX5 1kgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fuLC6mlEmOMGX8BDICOT7hFdobw9Zvr3y60q6GJGn+A=; b=oPBrowR8HpxQtQXP73O9r63lacgqNjP93lLMv9qWwvDuBUjRYwc+ta9pCiMjG/gQh6 Oxi+3gpFBjUw0wXMGJG7FDi/W9eFmuKZw3aX8stKbI3yTiWLXTRaudY35gtfBUoM/SbF R4TqIw4ow355au9H0qKq+7lnLoRghQycy6cLiM16FEOg7tQciwsKcX9TMMq5gOnCcVUl Jt7cJcRCdXnEhk531xnoWbOPpby0doeNkgd+++x68OBhgvh6Vvtkx5H3tqVqQJkNehOj qbJeYsYks7jiRUjXSYOWLTGPUorK75wZ+LUC2JeiwQ5y7ji+U0cZvL7Xzvt4reWiFlFf harA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dsqyybu2; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si897760edy.118.2020.10.21.00.39.46; Wed, 21 Oct 2020 00:40:08 -0700 (PDT) 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=@kernel.org header.s=default header.b=dsqyybu2; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408240AbgJTOhX (ORCPT + 99 others); Tue, 20 Oct 2020 10:37:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:51362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408135AbgJTOhX (ORCPT ); Tue, 20 Oct 2020 10:37:23 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9389B21534; Tue, 20 Oct 2020 14:37:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603204642; bh=f6kugA3U0QakUulP0txsV8BTYj/A5215gpbs4UZBY38=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dsqyybu2MKInKfeRhYrW8vkb0ymsQrvurWgo03nA1Q5MVwC/kOLvNMmZ9Ed/8aRiL ya2rx+LZfiIkoLhgcYVnyIbRP1wd4AudxWlepqbUQDEjreJCGCBeJUqwlTALe6McPJ SM5qeM1oDBEh6KMnBudKKbJJ6ENN4MFTbDhuc4iM= Date: Tue, 20 Oct 2020 15:37:11 +0100 From: Mark Brown To: Cheng-yi Chiang Cc: Srinivas Kandagatla , linux-kernel , Taniya Das , Rohit kumar , Banajit Goswami , Patrick Lai , Andy Gross , Bjorn Andersson , Liam Girdwood , Rob Herring , Jaroslav Kysela , Takashi Iwai , Stephan Gerhold , Matthias Brugger , Heiko Stuebner , Srinivasa Rao , Doug Anderson , Dylan Reid , Tzung-Bi Shih , Linux ARM , linux-arm-msm , Kuninori Morimoto , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , "moderated list:ARM/Mediatek SoC support" , "open list:ARM/Rockchip SoC..." , Ajye Huang Subject: Re: [PATCH v11 2/3] ASoC: qcom: dt-bindings: Add sc7180 machine bindings Message-ID: <20201020143711.GC9448@sirena.org.uk> References: <20200914080619.4178587-1-cychiang@chromium.org> <20200914080619.4178587-3-cychiang@chromium.org> <7bdc0d63-27b1-f99e-c5f8-65f880733d16@linaro.org> <20201015161251.GF4390@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WfZ7S8PLGjBY9Voh" Content-Disposition: inline In-Reply-To: X-Cookie: The people rule. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --WfZ7S8PLGjBY9Voh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 20, 2020 at 09:37:05PM +0800, Cheng-yi Chiang wrote: > May I know your suggestion on Ajye's patch "ASoC: qcom: sc7180: Modify > machine driver for 2mic" ? > https://lore.kernel.org/r/20200928063744.525700-3-ajye_huang@compal.corp-partner.google.com > I think adding code in the machine driver makes the intent straightforward. > If we want the machine driver to be fully configurable, > we can always add more code to handle properties like gpio, route, > widget (mux, text selection) passed in from the device tree. If the device has both front and rear mics and only one can be active at once that seems obvious and sensible. If the devices only have one of these then this seems like a bad idea. > But I feel that we don't need a machine driver to be that configurable > from the device tree. > I think having the logic scattered in various dtsi files and relying > on manual inspection to understand the usage would be less > maintainable than only exposing needed property like gpio. > Especially in the complicated case where we need to create a mux > widget with callback toggling the gpio like this: I don't understand what "logic scattered in various dtsi files" means, sorry. > Yes, that should work to describe the dailink we are using. > But a more tricky issue is how to do calls like setting PLL in dai startup ops. ... > I think that asking a generic machine driver to do configuration like > this with only a limited interface of device property > might be too much of an ask for the machine driver. Richard was looking at some basic configuration for PLLs. > Would you mind if I simplify the compatible string like Srinivas > suggested, and send a v12? > As for other two kinds of variations that I am aware of: > 1. front mic / rear mic > 2. replace alc5682 with adau7002 The CODEC change is going to be described in the DT no matter what - you'll have a reference to the CODEC node but it may make sense if there's enough custom code around it. For front vs rear mic the simplest thing would just be to not mention which if this is a hardware fixed thing, otherwise a control. > We can set different board names and different compatible strings to > achieve such variation. > So that it would make sense to describe configuration in compatible > strings like you suggested, and also provides UCM a way to distinguish > different boards. I don't recall having suggested distinguishing these things with a compatible string, especially not the microphones. UCM can already use the display names for the boards to distinguish things. --WfZ7S8PLGjBY9Voh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl+O9hYACgkQJNaLcl1U h9CspAf/b7bFcvyQbodhwCE9GoK96aMXJ54K2Y9rG4bcavB0WJbLggXc4xYp/uUS oDymKZzLQr+vEzU9gO/inLAIXfMd2QTgLQWrrY4K/Z/q6+Wo702H2r0kwEXIpj3E nB2VjUldnpl0XYCmavYeVaZLep8+qTL6QixnsLQq6zrwirPeyNpfQ2iu/FLzSYX6 EayieZWxAGuFfZkIoPg38GQqW6bZeuc8Nom0OY4Yqu/uoz29ekHKWOQm03DZyRK9 bTCBvPjsigi/ABXue224l0WavpRxvvjRNeswkQasH9rM/OIhY4CKktbaNmUW/1mH FIkwdq2b8lvHefF3atCnALr5tCyx1Q== =1PAU -----END PGP SIGNATURE----- --WfZ7S8PLGjBY9Voh--