Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp971001rdh; Fri, 24 Nov 2023 02:19:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFW4rpa7+vk3qKLQbv2VMKIwGtfBC7HxV3zKEWH030wqEHNJax67vVe5pE3yGAygulyHadZ X-Received: by 2002:a05:6a21:a583:b0:186:2389:a73e with SMTP id gd3-20020a056a21a58300b001862389a73emr3470607pzc.55.1700821168262; Fri, 24 Nov 2023 02:19:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700821168; cv=none; d=google.com; s=arc-20160816; b=ncN8bsaz0y/ztu/7n2cpCA6DhgkJsAvTFWnMtgo6srYKKSn7kaSLP2hxvGOzTl6YZP 57/6X1oXuh8VJqnt9GEH5xaB4eGaO9CCAWhbz1uLmDhJItb97YvjqdoyH6g4ugOSSYH3 qwHuA0jKk2VxuKlReO1uPg3H/eY7N/XEw149MLFPkowoCudclg3fZtnVBPjHX4VUrwTr PQFPCZMoxilXIAUAGccbBUEj3BqIb9qD8w77DDN735H8OpnIwaL05lT2WNyW9Ocwihiv RHBAS+hZyAqKPNzlyc95B/VNYYUsazKIyf63q4nK1rK/9x3RfEYleACrSGTPJtGALxk9 +nIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nviwB9AqusiG7OCivFtxXwUH4q/JEoEMdqSN0smBzUM=; fh=reS3z+lZmTs9PWI1n3LgU9HWYdFupDLQMxnhQqTx+IM=; b=sCKGirLZPcBo1J0J50ln6bW95ZJnFdDfQ6K4bVIofHSwlnEEhRtLt13LzRxLT/Ms2N DbiZQCIO+9tdVjqeD03TA/0iyWg4sae1TxFHVOy0gvyfO2s72EU3/phcIxE+kxF4acc/ FioxJmjxxCFH4foJAhsiAEJKPTzEBJ6tCpDc4Kz0JWH5AQw0yA6zTYoCih5FQEND0Efh Fgi8y3U1rzOtC4Bv/yEFk4QQpQPVkkGAmotHmLN3/SDclXkgeDdylrE1Z0+E5yLO/YQR DzAOkbypGBTNNsdtxoMckyHxx01VoV0LZhVS1U5+SDK6xty/KoNU2MmS8NPMu1FX8QRh dL6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EIQvHAcW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id k21-20020aa788d5000000b006c4de45c6d9si3289906pff.104.2023.11.24.02.19.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:19:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EIQvHAcW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A155283650A3; Fri, 24 Nov 2023 02:19:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345559AbjKXKTK (ORCPT + 99 others); Fri, 24 Nov 2023 05:19:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345526AbjKXKTE (ORCPT ); Fri, 24 Nov 2023 05:19:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1368CA2 for ; Fri, 24 Nov 2023 02:19:11 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FD8AC433C8; Fri, 24 Nov 2023 10:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700821150; bh=OEZjeJvaa0W7vSTE88cnpZau4Nam/6qChCui4cXBaN4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EIQvHAcWdH+aWdppBQyEJjgBwjnj5PnnQhO+8xHsqSeB6JHVnW6G1hVn2zzCxm480 H5bD3Fi5C1IuNoVzMIG9SgfodwjThbhDJjL0fgsXBSA5YCYGM1T0QVnzvKjJSkfVcC PvGPze6kTiRqJHjygRYv9msfNlebGeRIyr9LPvNKLPrmKxODAccrpw463vn+mwFbUC umgQVa122MGu4N+Yb3ab54opcbQZ+YXPTMLDqnfbqRgk4ic+347sp+IYJ5s9us5mZB 6eYz6vPGdNc2JP4GhfqOrjurYebJVCs8OIu2U0SIUxn1IXKANYUGg1cXvQsN6R319N vXJKMdOHPjiDw== Date: Fri, 24 Nov 2023 10:19:07 +0000 From: Mark Brown To: Neil Armstrong Cc: Srinivas Kandagatla , Banajit Goswami , Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/5] ASoC: codecs: Add WCD939x Codec driver Message-ID: References: <20231123-topic-sm8650-upstream-wcd939x-codec-v1-0-21d4ad9276de@linaro.org> <20231123-topic-sm8650-upstream-wcd939x-codec-v1-5-21d4ad9276de@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VQ2nRTjyMlGPMvXH" Content-Disposition: inline In-Reply-To: <20231123-topic-sm8650-upstream-wcd939x-codec-v1-5-21d4ad9276de@linaro.org> X-Cookie: Slow day. Practice crawling. X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 24 Nov 2023 02:19:25 -0800 (PST) --VQ2nRTjyMlGPMvXH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 23, 2023 at 03:49:15PM +0100, Neil Armstrong wrote: > + if (wcd939x->variant == WCD9390) { > + if (mode_val == CLS_H_HIFI || mode_val == CLS_AB_HIFI) { > + dev_info(component->dev, "%s: Invalid HPH Mode, default to CLS_H_ULP\n", > + __func__); > + mode_val = CLS_H_ULP; > + } > + } > + if (mode_val == CLS_H_NORMAL) { > + dev_info(component->dev, "%s: Invalid HPH Mode, default to class_AB\n", > + __func__); > + mode_val = CLS_H_ULP; > + } This lets people spam the logs from userspace, why not just return an error? > + if (hphr) > + wcd939x->comp2_enable = value; > + else > + wcd939x->comp1_enable = value; Are there really no constraints on the values for these things? > +static const struct snd_kcontrol_new wcd9390_snd_controls[] = { > + SOC_ENUM_EXT("EAR PA GAIN", wcd939x_ear_pa_gain_enum, > + wcd939x_ear_pa_gain_get, wcd939x_ear_pa_gain_put), Gains should be be named Volume. Is there no TLV information? > +static irqreturn_t wcd939x_wd_handle_irq(int irq, void *data) > +{ > + return IRQ_HANDLED; > +} Why even request the interrupt if it's just going to be ignored? --VQ2nRTjyMlGPMvXH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmVgeJoACgkQJNaLcl1U h9AZqgf9ER6M6fjDX85XA+DwqPsutTqM7mFbCjQypc4RvoCAFr404QMv94Pqj49B yVWWJEJ450NwalztnrIUsq8eTs9Fs/KpIhqEh202WlqHHd2EKGoAyHh6IEqF/yni F1YbWwejYTdL+16hOhMCtr0AtdhxEOe74omNJNcePl/yWCLx14CAA/snSAgVObjQ NO1Uhh1AgnAEO+S1jOvuGb3BzIor2UpcFNqhvKa6jkgRpEk/ZEUQjzJ/1bGdOF5r ny1HRvZgIcwIKyioGRREjdPmIGHFg+gLe3+LESxVy32YhpKkWaqYa4UT2wcVgtTp ej3yYYHUfeYQ6XtbWTd/o/wtzwlIWQ== =IuYR -----END PGP SIGNATURE----- --VQ2nRTjyMlGPMvXH--