Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3812475rdh; Tue, 28 Nov 2023 04:47:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGugW4eEg12/szPvN4cEY6Gwe+RCZGzW+t9ZZysr+OVXy/i4YPgJ2zzbdS08R3Q3yt56aD X-Received: by 2002:a05:6a20:12d3:b0:154:b4cb:2e8c with SMTP id v19-20020a056a2012d300b00154b4cb2e8cmr16310420pzg.24.1701175652700; Tue, 28 Nov 2023 04:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701175652; cv=none; d=google.com; s=arc-20160816; b=UMcsu3Hh91vj7pwD5E6XNKWwoT5U491N0rnL7gyLdvSeAaZkaXNyUrEjFF49yefdiC +aclNgBQ0+Z+j6xjmy6uxInEY9dNLiIWcZuYxu8fjyjXR4evhjtD+hVEXRSirp5+9BgC R46dbRl5Z6XoTZFa+M1uU4fhDICsj5PxlEa0Uzyskyke/MISP9WCkveJZEXsfjfkGZMk Doil2Q20Ed40DlxpCK5Tw8oM7D6vX0yY4tNWoeSlwczIal5EXZ4/khwrXyoyExkLHQj1 LpV6Xwj6+TDq40fi2Am/LjEeitqca7NtvW7q+us7Dd1AINMCXVviKgQ5WBiD2/uwfbQv hXoQ== 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=x/H5X7joKfRyt81JJ4Kv0fivRBQzdSyBUDsNaBE1guo=; fh=reS3z+lZmTs9PWI1n3LgU9HWYdFupDLQMxnhQqTx+IM=; b=TgO10yGecX6d/mCWva59dmDMEvyJkqJ0ph1CwqyNHOq4MIOg0VNpuknr/iCoAnMQtz CjVqAZgRR2rOUxoIEeC/RFRbP+B52z1tKdeOx3I759nQsNB24a/DTacVja85HopA3ddN PzWiiprpBmblIeGuLKW+OsLdEo4TzgjnkdmGleatI/v+yUtNv8fpeBLLrsfPTP0CK0KE jsXS/fCCcjj4KEX3impAO9x1x77bdwMMqOpZ21BkTOA2fU1Fh3KHzzDovGVNMEwxCz39 B5+VciD1ilPq+5bdMdHw2PLuOoZ9Tz08AiIAk4SAIJ3FhiLpg4wf5MuT1wXNvOxCzL2v lAuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Forr+1Et; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id v186-20020a632fc3000000b005bdd76219edsi11685582pgv.675.2023.11.28.04.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 04:47:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Forr+1Et; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 8338A8079AF0; Tue, 28 Nov 2023 04:47:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344414AbjK1MrQ (ORCPT + 99 others); Tue, 28 Nov 2023 07:47:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234802AbjK1MrP (ORCPT ); Tue, 28 Nov 2023 07:47:15 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE87BD4C for ; Tue, 28 Nov 2023 04:47:21 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFFEDC433C8; Tue, 28 Nov 2023 12:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701175641; bh=wz5MmqLlCmnpuKdiwKhGrAWVXAILgZuTDZs8I6iusiE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Forr+1EtaGHgFMmidpddzg6MbnY60fpHgKg7FSe6soz+RILdnmcCQZzXDkTNgdfb3 YWmON4fXBNtD1WJ+g9ONKGzcBeP7zldQDe03W6ZmeRji0Ri2VPGf4igZrBhf16sVPl p0nSNOhIVlkdCOgxSKjNSu5kPldrsrgxQfp9eyE/XqTkqGYq5bZcAJM2PhBbip5NwR WdIAMpENriUAUmei7ELMI7etamRDe1xUIOlhWNPnlnV0TOPPN8eoIN7gNb2woAzfWc TNYPdoKSVKy1OnGAO9tazOLtQkZ7ZQ+6ejpiVpfbSi+MA/W5zI3vBMmK4dOuHL8Z4h A0A8nADfizGaA== Date: Tue, 28 Nov 2023 12:47:18 +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 4/5] ASoC: codecs: Add WCD939x Soundwire slave driver Message-ID: References: <20231123-topic-sm8650-upstream-wcd939x-codec-v1-0-21d4ad9276de@linaro.org> <20231123-topic-sm8650-upstream-wcd939x-codec-v1-4-21d4ad9276de@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zRYJJGeNyjEN57NU" Content-Disposition: inline In-Reply-To: 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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 04:47:30 -0800 (PST) --zRYJJGeNyjEN57NU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 28, 2023 at 10:09:29AM +0100, Neil Armstrong wrote: > On 23/11/2023 18:43, Mark Brown wrote: > > > +static int wcd9390_interrupt_callback(struct sdw_slave *slave, > > > + struct sdw_slave_intr_status *status) > > > +{ > > > + struct wcd939x_sdw_priv *wcd = dev_get_drvdata(&slave->dev); > > > + struct irq_domain *slave_irq = wcd->slave_irq; > > > + u32 sts1, sts2, sts3; > > > + > > > + do { > > > + handle_nested_irq(irq_find_mapping(slave_irq, 0)); > > > + regmap_read(wcd->regmap, WCD939X_DIGITAL_INTR_STATUS_0, &sts1); > > > + regmap_read(wcd->regmap, WCD939X_DIGITAL_INTR_STATUS_1, &sts2); > > > + regmap_read(wcd->regmap, WCD939X_DIGITAL_INTR_STATUS_2, &sts3); > > > + > > > + } while (sts1 || sts2 || sts3); > > > + > > > + return IRQ_HANDLED; > > > +} > > We do this in the other Qualcomm drivers but it doesn't seem ideal to > > just ignore the interrupts. > It seems we simply ignore IRQs that are not mapped in the regmap_irq, > what would be the ideal way to handle this ? I don't understnad what "this" is here. Why even register an interrupt handler here? What is the regmap_irq you are referring to here and why would an interrupt handler here be related to it? > > > +static int wcd939x_sdw_component_bind(struct device *dev, struct device *master, > > > + void *data) > > > +{ > > > + return 0; > > > +} > > > + > > > +static void wcd939x_sdw_component_unbind(struct device *dev, > > > + struct device *master, void *data) > > > +{ > > > +} > > > + > > > +static const struct component_ops wcd939x_sdw_component_ops = { > > > + .bind = wcd939x_sdw_component_bind, > > > + .unbind = wcd939x_sdw_component_unbind, > > > +}; > > Do these need to be provided if they can legitimately be empty? > AFAIK yes, component code will crash if those are not defined. > I'll add a comment explaining whey they are no-op. If the framework can genuninely have empty callbacks here the framework should be updated to make the callbacks optional. --zRYJJGeNyjEN57NU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmVl4VUACgkQJNaLcl1U h9CQFAf/X86BJjWyIuWFGa/imsTVc1qRNOaSfXiSo5tUqzDx+dmeJZ0iDSexp52n +s6hQKvWt8aXarV/rAUIIM8yemaz2BMINAZQQxW5Qm0IpNH82u9AFczWvx9fK8AG ISjnkn5P+MEhqTHfB54ZNcdT11C9KPgo0kP5eMIsRNJxVPahElMgde866TSK7P3Q VYrYF+xKYHaoHR5kIC4lgHgbzVpaa2O9nbuur28vCX5HHg7Mv9y2ia1X2R+qLKrp yuB/5lBeGaFidOuZdoz8KqxsI9e4Z4aqzKGsMBVV7i966MiEX2cHfcEq0qC8y6QN dndVngDVmPkbhT/RFYsA7yCD2uRfxA== =P7CZ -----END PGP SIGNATURE----- --zRYJJGeNyjEN57NU--