Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp506182rdh; Thu, 23 Nov 2023 09:43:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtlMQCaUa/JSpYyISb6Vlw5KyWW3/N2jxDtBQ2cfTSY4PGIt6ftpVrhg0ePYELw9wc3hJK X-Received: by 2002:a05:6a20:2451:b0:18b:8475:410a with SMTP id t17-20020a056a20245100b0018b8475410amr341103pzc.7.1700761438356; Thu, 23 Nov 2023 09:43:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700761438; cv=none; d=google.com; s=arc-20160816; b=C6gqTTIhovVOI9P0/wpk/NujFtRcYNyre9Jp+LHQwMOWfZXsWhF56vUrDh1OWinFLw 4Xixv2E2PWfGyxCh7P0k8WdHWdS6aBSDITkr2IIXXVEz16vaRqYc1bq/Jfa9sG5CCuGD Luvr9ibMZZYDJtQny2GRjMoJ0zJ4gVUNgO4oAGry7QKSSSLqN3etrp/gx0J4vKScVgdt F+TiJToQJ3t31wXbXHW7Nbxh/LUdAnVo2ryw3Lp1dVJKnvOSCuP4eRqWKWlE7M8osvz/ JSv0CP8mjRL4SrrsLiNFDFUkULspY4rkwggKJhGZoEqhkFziqwanj0450He+8UB76FnI OV4w== 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=r/4lA5bGdGAmsCPP+76qNg6c7CK7T9ZAFYZT4nfrlkk=; fh=reS3z+lZmTs9PWI1n3LgU9HWYdFupDLQMxnhQqTx+IM=; b=I0eQjlQ7pC1nC4DafB3eHSb8C/uNgcuP2cg/t4w7Ut8CHGAAsMwqBcquToK2verfS6 ep3Sl/VxYrEBitXpz8uWuh8VYr+QI33LiSFRREh26xtwkXfq40HgVENB3F/gGGTYEPjT q7IIp7K3qiJdWtu4RckFkv8QTTkgpw2YbL9Z43rmpp1F/TR6g6WBUABMpNajFVJPU6ne bvQmtRkASn2g4z4YT8T3UJz8GNLyrrzJsrsgc8qk2PD9oGXINyStXTBp8z8ZW8Y48D8o aBJnWoOJMfkkjcOC255fzMARNUor6FShNOUOGlTNpt9DpcWJKsBFeF/l5DVo8b+Rxb2e iLwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="EUK/QVte"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id a21-20020a63e855000000b005be232472e6si1711430pgk.474.2023.11.23.09.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 09:43:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="EUK/QVte"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id CD6498098FEB; Thu, 23 Nov 2023 09:43:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345621AbjKWRnm (ORCPT + 99 others); Thu, 23 Nov 2023 12:43:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjKWRnl (ORCPT ); Thu, 23 Nov 2023 12:43:41 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 081E410C2 for ; Thu, 23 Nov 2023 09:43:48 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8729C433C8; Thu, 23 Nov 2023 17:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700761427; bh=1GRk6pF6ONArbuEDYzf53o3CAsRNhMgYXX01fUitKEQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EUK/QVte4vbuMVsB7J0ZDQXQPfx5ZzqhBZOhhYXYl+f0qLTL1oOdCbPQ8soI+D9Ee lLr90oOKzn2mI92pdKjbW39eFkQ0GSOJjcyT6adnMdiDnhRB3xMjBD5TgAH4bV6NWh zUYM5BmACPrvUX0Thlj/wUOp31f3cOuJrbJejyUoKR2etkkH1ile+WN036EMVW2DqT u6oOAbS5e4UkOdxtE5rqKgQ0AqfTWN7qYbgnZsGCaXYUVB0crrskCXVWkx/q9UsmMf cZPM91apJKntl3C6x/aRusganoJT+ab/o4O+hbp3yxgKP8ous4VJPWd+HHW8z9aZlX c6tMeQ7jEcPyQ== Date: Thu, 23 Nov 2023 17:43:43 +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="42Lt/E9P87lWIhco" Content-Disposition: inline In-Reply-To: <20231123-topic-sm8650-upstream-wcd939x-codec-v1-4-21d4ad9276de@linaro.org> X-Cookie: Slow day. Practice crawling. X-Spam-Status: No, score=-1.3 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 23 Nov 2023 09:43:56 -0800 (PST) --42Lt/E9P87lWIhco Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 23, 2023 at 03:49:14PM +0100, Neil Armstrong wrote: > Add Soundwire Slave driver for the WCD9390/WCD9395 Audio Codec. > The WCD9390/WCD9395 Soundwire Slaves will be used by the Please avoid using outdated terminology, "device" is probably a good alternative here. There are some usages in APIs that need to be updated but still, good to avoid where possible. > +static struct wcd939x_sdw_ch_info wcd939x_sdw_tx_ch_info[] = { > + WCD_SDW_CH(WCD939X_ADC1, WCD939X_ADC_1_4_PORT, BIT(0)), > + WCD_SDW_CH(WCD939X_ADC2, WCD939X_ADC_1_4_PORT, BIT(1)), > + WCD_SDW_CH(WCD939X_ADC3, WCD939X_ADC_1_4_PORT, BIT(2)), > + WCD_SDW_CH(WCD939X_ADC4, WCD939X_ADC_1_4_PORT, BIT(3)), > + // TOFIX support ADC3/4 & DMIC0/1 on port 2 > + //WCD_SDW_CH(WCD939X_ADC3, WCD939X_ADC_DMIC_1_2_PORT, BIT(0)), > + //WCD_SDW_CH(WCD939X_ADC4, WCD939X_ADC_DMIC_1_2_PORT, BIT(1)), > + //WCD_SDW_CH(WCD939X_DMIC0, WCD939X_ADC_DMIC_1_2_PORT, BIT(2)), > + //WCD_SDW_CH(WCD939X_DMIC1, WCD939X_ADC_DMIC_1_2_PORT, BIT(3)), Why are these commented out? > +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. > +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? --42Lt/E9P87lWIhco Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmVfj08ACgkQJNaLcl1U h9AbPQf9HwduNNNq58Fi9Zk4pDIkhiO6nVd+QB5hkOPoAqoUexbSojnNREgdQUy/ S5Ek1XNG04jXfE7MYvLpIEO6bhwa6uv/Zn7UM3i0EDIzd2qXT4vH6Ce4/pl2+IsK 3bcbiKFHCpSQRCbzay9Fm4DUdMXbEIpBeZmMznljBtZmF7UIj1xVLJQEsEiwWJ7G 8NTb1aJ9QauPhZgkcuizCmNrZkQseSioyDmFZPZlD6TmofHqz2A8MiI5oLQVQr7s zvFENMqhOHPxwb9b/orlGQqf0tKdoZZDO66P0b3g242Z2KItP/Aasq4FiQTJ24LP /69tGglcrDDBrHEBUmmx6ULgLVUoCw== =YBBq -----END PGP SIGNATURE----- --42Lt/E9P87lWIhco--