From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAE2BC07E9B for ; Wed, 21 Jul 2021 08:01:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC52A61019 for ; Wed, 21 Jul 2021 08:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235400AbhGUHVC (ORCPT ); Wed, 21 Jul 2021 03:21:02 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:37255 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234859AbhGUHUz (ORCPT ); Wed, 21 Jul 2021 03:20:55 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 9EEFC5816BD; Wed, 21 Jul 2021 04:01:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 21 Jul 2021 04:01:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=t/iRrQczCNXUrTQ/j8FZjeqa8BE VK33aJLsccDr4NTM=; b=cxMnA1EIqfXTHhv+5C4H4uAia2YRug82j/R2D/QeC5H 9iUK8LMixRPvMy3puG3fmJmNHa4SfvnU5kN05hrIgs6FDeDmsnsIIKmW9WAPx6kS QbJDN3ggQ3TZpqbENzIZgkLY/09k5U5t8bwfSYrLTmpkGSwwfhEsAQHQeIx7sMx+ pYLaOHFCndJCgTnQ4BbiCiwjGHwSBYiIttClIPabD5ws/z10Gepj+SGp67y39mVM +E6+g1UYqjP13cDe06x6z2ZT3F4WXpBQ4IE8alRjFXl1vF/zayEMhEqz4+Z9AQcN PI2df7/g258qZo3snhNpVkILipyDZANlnEcXRt4Wl4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=t/iRrQ czCNXUrTQ/j8FZjeqa8BEVK33aJLsccDr4NTM=; b=Qb8+YO/GrqzlJI+yalgu7s lTBGTPjXrBO8tnUtII/ULj4NDVAPMk+DIhIjDgsjpAcbRDJTUIm+keJX0D9EM9Pr ARxu8wP3QffCRab7R5JEs1NlIB4hLBzGRdJWnTs/WU7U/WhNWpkCBcJBIkyNC0Tr fX9sO66WUOgZXLu6mc/aRoHsgisu/mQByS5VrB5G/6WBRBmPMH4+86xwIfecUoqy Jyo1itoVO3fEEY6kQev4ULLsAVoTsqIdXenpCUR8rvQHpT0QFsZcy/WZ305zT5ae 01/5VklNMUCnhtp+/XSnsZt05sJv9n64QumQgWpK0rUfeRaoh3IW6IS7kypbVPHA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfeefgdduudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdortddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevhefgje eitdfffefhvdegleeigeejgeeiffekieffjeeflefhieegtefhudejueenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh drtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Jul 2021 04:01:19 -0400 (EDT) Date: Wed, 21 Jul 2021 10:01:17 +0200 From: Greg KH To: Michael Grzeschik Cc: linux-usb@vger.kernel.org, laurent.pinchart@ideasonboard.com, caleb.connolly@ideasonboard.com, paul.elder@ideasonboard.com, balbi@kernel.org, kernel@pengutronix.de Subject: Re: [PATCH v3 1/5] usb: dwc3: gadget: set gadgets parent to the right controller Message-ID: References: <20210628155311.16762-1-m.grzeschik@pengutronix.de> <20210628155311.16762-2-m.grzeschik@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210628155311.16762-2-m.grzeschik@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Jun 28, 2021 at 05:53:07PM +0200, Michael Grzeschik wrote: > In case of dwc3 it is possible that the sysdev is the parent of the > controller. To ensure the right dev is set to the gadget's dev parent we > will hand over sysdev instead of dev, which will always point to the > controller. > > Signed-off-by: Michael Grzeschik > > --- > -> v2: first version of patch > -> v3: - > --- > drivers/usb/dwc3/gadget.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index af6d7f157989d..8a1b1daff2e97 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -3990,7 +3990,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) > } > > > - usb_initialize_gadget(dwc->dev, dwc->gadget, dwc_gadget_release); > + usb_initialize_gadget(dwc->sysdev, dwc->gadget, dwc_gadget_release); Does this change how the device shows up in sysfs? Why does the parent not always work properly here? thanks, greg k-h