All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Michael Grzeschik <m.grzeschik@pengutronix.de>
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
Date: Wed, 21 Jul 2021 10:01:17 +0200	[thread overview]
Message-ID: <YPfUTSOpXCSDnmyW@kroah.com> (raw)
In-Reply-To: <20210628155311.16762-2-m.grzeschik@pengutronix.de>

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 <m.grzeschik@pengutronix.de>
> 
> ---
>    -> 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

  reply	other threads:[~2021-07-21  8:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 15:53 [PATCH v3 0/5] usb: gadget: uvc: improve uvc gadget performance Michael Grzeschik
2021-06-28 15:53 ` [PATCH v3 1/5] usb: dwc3: gadget: set gadgets parent to the right controller Michael Grzeschik
2021-07-21  8:01   ` Greg KH [this message]
2021-07-21  8:11     ` Felipe Balbi
2021-06-28 15:53 ` [PATCH v3 2/5] usb: gadget: uvc: make uvc_num_requests depend on gadget speed Michael Grzeschik
2021-06-28 15:53 ` [PATCH v3 3/5] usb: gadget: uvc: set v4l2_dev->dev in f_uvc Michael Grzeschik
2021-06-28 15:53 ` [PATCH v3 4/5] usb: gadget: uvc: add scatter gather support Michael Grzeschik
2021-06-28 15:53 ` [PATCH v3 5/5] usb: gadget: uvc: decrease the interrupt load to a quarter Michael Grzeschik
2021-06-28 16:47 ` [PATCH v3 0/5] usb: gadget: uvc: improve uvc gadget performance Michael Grzeschik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YPfUTSOpXCSDnmyW@kroah.com \
    --to=greg@kroah.com \
    --cc=balbi@kernel.org \
    --cc=caleb.connolly@ideasonboard.com \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.grzeschik@pengutronix.de \
    --cc=paul.elder@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.