Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp305372ybi; Thu, 1 Aug 2019 19:29:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRxTaVrQveDSevKTqJUIQVcOYumcsyQJQjDsXOo7GJ9OLX5vt5mpj/VdUax2c+X8aSlguB X-Received: by 2002:a63:9c5:: with SMTP id 188mr86255792pgj.2.1564712964968; Thu, 01 Aug 2019 19:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564712964; cv=none; d=google.com; s=arc-20160816; b=p6IDag/I6kAsu5a6kpHZYYRpOOEUJ4qOklY7mXiljeZCZU5Z9yRImsNNq2UnVuBSQs 14AEQTNObA9wau4nNZmBx/pUh/9zBVEv6tr4kyIBXcD0W0KBq1CK6raXwsZe4om9D+nW R7eNMAxLlEswbU8f90Rzj6V2b3MWJfU84u4PC9boL/JzWg8t89viGqvhN/mBmJa+f6Wp JANeZQhpbyJQdARU+QydKmqwulyQLuwzodlSNxBvxuXxoOUPQu9IuVXPmTsEgf4W5aC6 iCw8UPZY+nfNNFr4+TyGeXhwcR7mmmOJ/BcPQ8WLyt5ykXi/lpks0qdHWc0rGmODvb1d XORw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UeFWpR2JBrWem/9wSROF50ByE9BuApCdhL94heuW2BI=; b=JLTdwvX9LBz5J28Dl3EJlbDqja+Kui3/W1sEcFPlAuBb63zITzgGP32rCtU+nsk8Dq iHOSNfUMEt/DTxtKJ1pg4jRXBHmSWXEGxRAZwvgho/KAzqe1p/a011n88zilL+KQBk8y kDu+1rX6ZX+3/x52+DfgLQ/GtMVUWPgxbeCIpCd3ZNyxo0aqqYrmllF+Gi4WT/kFJmXO 5VBUUOb3agvM0roLeptzfTxx55enfAiOxrexMVsiTs/UXUnJCNr/4P8eD0vyscTXkP/H YpLHwo7IHjDiIUlFiFJXl+zFhGR4dZSmVb4PMYCdJQm9PSXdo1RzVpa54dyezev/UT8N QyUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=FYVwCyEd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w188si38770452pfb.175.2019.08.01.19.29.10; Thu, 01 Aug 2019 19:29:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=FYVwCyEd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388553AbfHAXnK (ORCPT + 99 others); Thu, 1 Aug 2019 19:43:10 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:44102 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732215AbfHAXnK (ORCPT ); Thu, 1 Aug 2019 19:43:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UeFWpR2JBrWem/9wSROF50ByE9BuApCdhL94heuW2BI=; b=FYVwCyEd7AnlQexu483HI2L9k DYlSzQ5esEFQ/VMRiooF73uvH+7gblU+e7zpBAgF9Libs4rQL6vl4nTrZJDV9s3zN7fRlZASzf+cR d0pzhLiN1qGiRjqK+RNCWdEbr96Va3K2z8bpwT9/vNV8XEvWzgKnyIkajwxd8NcgWxl/s=; Received: from ypsilon.sirena.org.uk ([2001:470:1f1d:6b5::7]) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1htKiY-0005pu-GG; Thu, 01 Aug 2019 23:42:42 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id AC9EF2742E3A; Fri, 2 Aug 2019 00:42:41 +0100 (BST) Date: Fri, 2 Aug 2019 00:42:41 +0100 From: Mark Brown To: Thomas Preston Cc: Mark Rutland , devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Charles Keepax , Kuninori Morimoto , Kirill Marinushkin , Liam Girdwood , Marco Felsch , Annaliese McDermond , Takashi Iwai , Paul Cercueil , Vinod Koul , Rob Herring , Srinivas Kandagatla , Jerome Brunet , linux-kernel@vger.kernel.org, Cheng-Yi Chiang Subject: Re: [alsa-devel] [PATCH v2 3/3] ASoC: TDA7802: Add turn-on diagnostic routine Message-ID: <20190801234241.GG5488@sirena.org.uk> References: <20190730120937.16271-1-thomas.preston@codethink.co.uk> <20190730120937.16271-4-thomas.preston@codethink.co.uk> <20190730141935.GF4264@sirena.org.uk> <45156592-a90f-b4f8-4d30-9631c03f1280@codethink.co.uk> <20190730155027.GJ4264@sirena.org.uk> <9b47a360-3b62-b968-b8d5-8639dc4b468d@codethink.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kjpMrWxdCilgNbo1" Content-Disposition: inline In-Reply-To: <9b47a360-3b62-b968-b8d5-8639dc4b468d@codethink.co.uk> X-Cookie: Love thy neighbor, tune thy piano. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kjpMrWxdCilgNbo1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2019 at 05:28:11PM +0100, Thomas Preston wrote: > On 30/07/2019 16:50, Mark Brown wrote: > > Like I say it's not just debugfs though, there's the standard driver > > interface too. > Ah right, I understand. So if we run the turn-on diagnostics routine, the= re's > nothing stopping anyone from interacting with the device in other ways. > I guess there's no way to share that mutex with ALSA? In that case, it do= esn't > matter if this mutex is there or not - this feature is incompatible. How > compatible do debugfs interfaces have to be? I was under the impression a= nything > goes. I would argue that the debugfs is better off for having the mutex so > that no one re-reads "diagnostic" within the 5s poll timeout. It's not really something that's supported; like Charles says the DAPM mutex is exposed but if the regular controls would still be able to do stuff. It is kind of a "you broke it, you fix it" thing but on the other hand it's better to make things safer if we can since it might not be obvious later on why things are broken. > Alternatively, this diagnostic feature could be handled with an external-= handler > kcontrol SOC_SINGLE_EXT? I'm not sure if this is an atomic interface eith= er. >=20 > What would be acceptable? Yes, that's definitely doable - we've got some other drivers with similar things like calibration triggers exposed that way. --kjpMrWxdCilgNbo1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl1DePAACgkQJNaLcl1U h9BbgAf9HMcTl/Pb+iJa1dDcV8qVUzhtY4Qcn3rqBYU+aGzm0J4NOtjtrA70Hdna sTNCLx5kaaX9kA5IKWbzwBC1qcf0S8io9cJUgJOYGHitLHliifYiZLX2KpJp/JFf GlSodNZf43W45fkhOO5+1xyiI5/KcDbu3U5IBYXVSmCSQsSeZWcydts0VhFTdXGC epXFQGet/BGcQ2yfZTuykkV+YepjF07Tk7KOm/4Gdbv7peiwv+dvI2Lef/x8d61y cUBhDvFOTToajfBJfwBhZ7dx7OgqLs2/DJdgvRZnE/q1VCq/1YyDl9uUXqvnAgCs 2XlNTqpd0yH1IjQwz+/8lsGUht5MXA== =1ie6 -----END PGP SIGNATURE----- --kjpMrWxdCilgNbo1--