Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp641595rwd; Wed, 7 Jun 2023 05:11:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WkP3pC3MCtnm7Gd7/gS5kmQG1Vl6F4cKByEZOfNf/iOH+AhlDd/VVw2dFQcFDNRXcDsy0 X-Received: by 2002:a05:6a21:3a81:b0:106:4197:b7ff with SMTP id zv1-20020a056a213a8100b001064197b7ffmr979587pzb.30.1686139880235; Wed, 07 Jun 2023 05:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686139880; cv=none; d=google.com; s=arc-20160816; b=qGMvc2hyAwfDO6NfTfJB9hOYGzHGFEfQE+G8pj51GCsxspawi2cb+tI3NUAA3eFDvx ItkxHcE3KxP5oxsJG43MABUKFVArhpiObIglFUdaK6rqMg+Se4k8bLe0qtvvlsfmQrA/ M3il5xEOBZ3sjnd03+XtEOIm8PzzuEkVWDQPhBKHlRLRrfPGkNz6KcuOvAagk+/ov9Pa egasXqfhvjk2pBe+6ysxyXegnoZYzZgFlIIaPCtb8iWc5bjDd/0elMItIFZyod3ZvuOh Y5lQ3//WMGVn5K9WB4BxDtyQlucXNL9FISuFKVLv+JW0mnXdI+YB9qY28waXZ4eLiHIP Qupw== 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=9zOwmJedVGVBPLUUeAn3YAJ4bMPvPkYJqWlCtIvDCmY=; b=vcYjsCZhSebp7o96169sxu7j84XRxZeaZ1NKGzukftTHUm/H+ZqL4nmaA9kSgDV4Zg stqpVYn/gc2iQ4uKS3LTVa1X85jKgo8yKu8BmKaImFrlx1BV0uQoNohejSTLbhmA8ETw 8ZVgFhoZykBWZ7FpoWWD8bt/HMXnk2f7kAWhaIEj0U/3fpXeBRq65LGsoRjwCsnApELi xrN7oSJZYVArkBQ1zyG8UGuA5P4WNQC5TfV2eqymX8rRy9YMxpVsLBLM4nRsCn81tc68 bbeiHppjTsZEXUDH53oMGeQNZVABR9qAbOcUjUkPXkGPOB86rTJ3vTKOFz0Q9VO//H3h qMRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XP5fEfMW; 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 y16-20020aa793d0000000b0064f4a8f385bsi8596458pff.136.2023.06.07.05.11.04; Wed, 07 Jun 2023 05:11:20 -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=XP5fEfMW; 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 S240396AbjFGLoK (ORCPT + 99 others); Wed, 7 Jun 2023 07:44:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234932AbjFGLoI (ORCPT ); Wed, 7 Jun 2023 07:44:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A34419BD; Wed, 7 Jun 2023 04:44:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9F35B63DEC; Wed, 7 Jun 2023 11:44:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E24B6C4339B; Wed, 7 Jun 2023 11:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686138247; bh=MwyhiYcJENevj1dluDqPre/wvn9RYsMbpU1n3B8UBGc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XP5fEfMWhR1k6iKYyVbghg7Zpf0snzMJyW2y9bOGK3IxsQ5pf82vV4ZhdQCoV9604 CW25JEqmDKX69xEOQDDVte4q8yZeGdJ9tGVPh5z2Ufa0B0mP/OeLHEwmfLDpv2O2e/ +7z64XYje57uCu3pJ/t0E0jutzfBuqx/GYjHgQO8JqXff3p/LE9OKS6O0FlPubA7Fp a150cXzUyFoo+zxAQaqLuwbZElgTfJ72pXnKMQs0YT60BFpBQ8R5fxY5jLM8uXw71X 6IxHLMjGc+JN0Z0b2zcOf7ms1vYhFf1RQhTok5XNwOpiIjS1ARgRiYuA6vwowFrzmY TR+KUDe32WlVA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1q6raW-0008Uw-VQ; Wed, 07 Jun 2023 13:44:29 +0200 Date: Wed, 7 Jun 2023 13:44:28 +0200 From: Johan Hovold To: Krishna Kurapati PSSNV Cc: Bjorn Andersson , Thinh Nguyen , Greg Kroah-Hartman , Philipp Zabel , Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Felipe Balbi , 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_wcheng@quicinc.com, quic_jackp@quicinc.com, quic_harshq@quicinc.com, ahalaney@redhat.com Subject: Re: [PATCH v8 6/9] usb: dwc3: qcom: Add multiport controller support for qcom wrapper Message-ID: References: <20230514054917.21318-1-quic_kriskura@quicinc.com> <20230514054917.21318-7-quic_kriskura@quicinc.com> <20230515222730.7snn2i33gkg6ctd2@ripper> <20230526025554.ni527gsr2bqxadl3@ripper> <37fd026e-ecb1-3584-19f3-f8c1e5a9d20a@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37fd026e-ecb1-3584-19f3-f8c1e5a9d20a@quicinc.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On Fri, May 26, 2023 at 08:55:22PM +0530, Krishna Kurapati PSSNV wrote: > On 5/26/2023 8:25 AM, Bjorn Andersson wrote: > > We need to fix the dwc3 glue design, so that the glue and the core can > > cooperate - and we have a few other use cases where this is needed (e.g. > > usb_role_switch propagation to the glue code). > Thanks for the comments on this patch. I had some suggestions come in > from the team internally: > > 1. To use the notifier call available in drivers/usb/core/notify.c and > make sure that host mode is enabled. That way we can access dwc or xhci > without any issue. I don't think this is a good idea and instead the callbacks should be dedicated for the xhci and dwc3 drivers. A struct with callbacks can be passed down to the child devices, which call back into the drivers of their parents for notifications and when they need services from them (e.g. during suspend or on role changes). > 2. For this particular case where we are trying to get info on number of > ports present (dwc->num_usb2_ports), we can add compatible data for > sc8280-mp and provide input to driver telling num ports is 4. That may also work as a way to avoid parsing the xhci registers, but I'm still not sure why simply counting the PHYs in DT would not work. Johan