From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2825DC41518 for ; Tue, 2 Mar 2021 20:09:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EEC2F64F2C for ; Tue, 2 Mar 2021 20:09:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1582011AbhCBUBy (ORCPT ); Tue, 2 Mar 2021 15:01:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:53658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238915AbhCBRbU (ORCPT ); Tue, 2 Mar 2021 12:31:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DDC0A64F34; Tue, 2 Mar 2021 17:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614706231; bh=zMsEr7NF02vkcIHVkx/Vs36PXAllyxVlPl3cpejbnoU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vdz68UEfkqL3qK16PfAG44S7Ef3+Rw01xKKIGTBCtV0a+UFCAAKEXm15pNkdSPTbU wHZkW45hj4L+trxZSL3Jrw7Wf8q/G0sBo7CV5SbtE2JaZMDhJCp4XbeXwJRqDurzhT y3u/tCM+489GPba1K3pwEaWtr+6G2g7mwN14De0Yu06QmMDeKsrpnmOpCM2pBOA/8c YFH1YpVPV4CgUB80V1ysdMxkEb1dMbIqBgfRrXx07XnVr8NrbImTSVVqVgJPxa/v+7 nGSg8MmXhTrceKigBGHxFpMLj+5iTwWdE/CLFaPY/qvFt0RVMDzQPFv+fLvspMhLGp JPVEVuCaQz+IQ== Date: Tue, 2 Mar 2021 17:29:23 +0000 From: Mark Brown To: Lucas Tanure Cc: James Schulman , David Rhodes , Liam Girdwood , Richard Fitzgerald , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/15] ASoC: cs42l42: Report jack and button detection Message-ID: <20210302172923.GR4522@sirena.org.uk> References: <20210302170454.39679-1-tanureal@opensource.cirrus.com> <20210302170454.39679-11-tanureal@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o+ZCuNqY+dEAKBWl" Content-Disposition: inline In-Reply-To: <20210302170454.39679-11-tanureal@opensource.cirrus.com> X-Cookie: Friction is a drag. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --o+ZCuNqY+dEAKBWl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 02, 2021 at 05:04:49PM +0000, Lucas Tanure wrote: > Report the Jack events to the user space through ALSA. > Also moves request_threaded_irq() to component_probe so it don't get > interrupts before the initialization the struct snd_soc_jack. This looks like it should be split into two changes too, one for the code motion and one for the jack API. However I'm not convinced it's a good idea to move the interrupt requesting to the component registration, in general we should be doing resource acquisition in the main probe function so things like deferred probe work well - it gets messy if we try to handle stuff like that in component registration. I'd have expected the interrupt handling to just be able to check if there's a jack set, and note that snd_soc_jack_report() supports being called with a NULL jack anyway. --o+ZCuNqY+dEAKBWl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmA+dfMACgkQJNaLcl1U h9CiVgf/dFINDm+6qu7kKJCs0YL6+0f85LIlSpcHaZ9UE5N60AVCnC7jZqbDmygz j/DhCUDmk6o5G8IU6S1OOD76dLRHO7UMTzTo72DWLPUKfNsceNNZr3D3uNYQ0xNk 1uW01K4kEXwp1xfChstEp/PqJQ86QMiYiAIE8qmm+1vM5NqscS8xLOfmDdUjJwI5 o8U2P8VIJscJ5KKfLUzyJ55AtYwl88WfeLTjDCvn8fSHF/X5HghO58HfomWfXDkm KSNmGBbnKmxVSBxxSapAjvLD8HMChpuis1ulxZMh5MiocoAiRVtRaRG6WrTZ2ToM nXb5LftNZQTx7+Dqet0CIsGxBdK3EA== =Ov94 -----END PGP SIGNATURE----- --o+ZCuNqY+dEAKBWl--