Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10649563rwp; Fri, 21 Jul 2023 02:42:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlFG2zZPac1Um2zF/VOXekKjJ9gyKET3tFPBYUJtVFl0FRVs2JvT7bvlu5lNFUm/B7ut2czx X-Received: by 2002:a17:906:5189:b0:993:fe68:569c with SMTP id y9-20020a170906518900b00993fe68569cmr1274416ejk.6.1689932575952; Fri, 21 Jul 2023 02:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689932575; cv=none; d=google.com; s=arc-20160816; b=0BmuD/tlGb9b5tn8XDliHrDzJkua8NjhKRGvggtxUlCVFslGDfS4VXUMqyrpbUgQGE c3fuIVZlvcaucPPwJcOlG8UjNXhOo4ZEE4gBbpaj/Z9+uv4PXsjFf/KEd0o60M6u12ql y5uzGXn1RHfviFsNTNSn+Pd5nrWh+z8lT0RkozR9e7NZ6d4Pb2z1eLHnN2ThaQrcbQXn AdXrVR5AFEKrm2o5PqQVx2pSmuhFQYp2E/iDbFCdjCiIx9+0kAKh9y4ZtpXDA8m12kHt V/X0lB1dgQ16RDib6sCi5/u6PH5dDUQZKadZxdmKcdbM0to9K1eH2ypgpWNCbEMSX0dl fJdQ== 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=WdVGQsvjGEgPNnH1YbCFfWPNbPP/W46t5uD4RIoNNcA=; fh=CJbyJdypWOasX+o2gsBb/b5439A8J5Eh60G3UWEXc+M=; b=eEvVSTkvJo8pAJblt3eLyIGDw3IxM/Montj8xC9lexX9+9OzIM3EofA9hcmZ8Bpwpa ShrqwRHUiUeWJI4vm69bi3b5MOBE9r6CTAzDE5anviKbAK7hCJxy9rIoAlDj55T3bVOA y6YovDasMhVQpV/dUn1PSSIh7QRt7LLazApYQWH/yhmxEG1QFQKMo/UTSHVgM6PT5pjR sH6EWvorp+zRI28UoFagUE9KGfKsqvPjlmC1pc9aySmrri6ths+nQygapoEfuXk6AgI1 lDAiZ5sctxGGsyGCpBF9steTJwPVXWXZod8K23Gys3AnIRRlRAT0Qb6REBjLJvGa+Aaw 4Icw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=smhFFR5T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a170906370900b009930e235977si2100880ejc.886.2023.07.21.02.42.31; Fri, 21 Jul 2023 02:42:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=smhFFR5T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231760AbjGUJVh (ORCPT + 99 others); Fri, 21 Jul 2023 05:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbjGUJVd (ORCPT ); Fri, 21 Jul 2023 05:21:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 463ED30C2; Fri, 21 Jul 2023 02:21:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D0C826162C; Fri, 21 Jul 2023 09:21:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EADADC433C7; Fri, 21 Jul 2023 09:21:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689931291; bh=ITIHgfNish4ScHCGzlluolo3YJdgMQUBDwaI7t7ZYUM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=smhFFR5Tfz/dvfDwv2AeEEh8VD6iL8AKeBByY2Ds/NLVsQEgtHFOeKPmatv/oXt8F ooQKb+yKOHBsg681w9SMykkbRi+n0mjMsjugKt4bLO2b07+MLVRBp9Cf6x/R6C2D2f SF8iOXhvJr7QwaXNhoY72DBIhEFps85WehGedtsHX0zicE0EzagmlRxV3ApDmcW//T VKCgBbYF0H2E5w3YS2fiPiq7ip4fOSF++9EMU4DAz9CsDyCfja5PjfZ0l3V5ctpA2L B2MloIISOABZ2t0X2XigR1bsj5aNlsPF4In7iFypTBzXpyQxwlI2Xp4L51tsI3DRg/ l2o7l7yIXzb6w== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qMmKR-0003ZC-1w; Fri, 21 Jul 2023 11:21:39 +0200 Date: Fri, 21 Jul 2023 11:21:39 +0200 From: Johan Hovold To: Krishna Kurapati PSSNV Cc: Bjorn Andersson , Konrad Dybcio , Thinh Nguyen , Greg Kroah-Hartman , Philipp Zabel , Andy Gross , Rob Herring , Krzysztof Kozlowski , Felipe Balbi , Wesley Cheng , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, quic_pkondeti@quicinc.com, quic_ppratap@quicinc.com, quic_jackp@quicinc.com, quic_harshq@quicinc.com, ahalaney@redhat.com, quic_shazhuss@quicinc.com Subject: Re: [PATCH v9 06/10] usb: dwc3: qcom: Add support to read IRQ's related to multiport Message-ID: References: <20230621043628.21485-1-quic_kriskura@quicinc.com> <20230621043628.21485-7-quic_kriskura@quicinc.com> <7e32cf95-1565-5736-cc3e-c70e8d8f3ca7@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Again, please remember to trim your replies. On Fri, Jul 21, 2023 at 01:49:37PM +0530, Krishna Kurapati PSSNV wrote: > On 7/21/2023 1:44 PM, Johan Hovold wrote: > > On Mon, Jul 03, 2023 at 12:29:41AM +0530, Krishna Kurapati PSSNV wrote: > >> On 6/27/2023 8:01 PM, Johan Hovold wrote: [...] > >>> So the above should all be merged in either a single helper looking up > >>> all the interrupts for a port and resused for the non-MP case. > How about the implementation in the attached patches. This way we > don't need to know if we are multiport capable or not. As I wrote above, I think you should instead add a common helper for setting up all the interrupts for a port. For example, along the lines of: dwc3_setup_port_irq(int index) { if (index == 0) try non-mp name else generate mp name lookup and request hs irqs lookup and request ss irq lookup and request power irq } dwc3_setup_irq() { determine if MP (num_ports) for each port dwc3_setup_port_irq(port index) } The port irq helper can either be told using a second argument that this is a non-mp controller, or you can first try looking up one of the non-mp names. My mailer discarded your second patch, but you cannot assume that the devices connected to each port are of the same type (e.g. HS or SS) based on what is connected to the first port. Johan