All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Caleb Connolly <caleb.connolly@linaro.org>,
	Marek Vasut <marex@denx.de>, Tom Rini <trini@konsulko.com>,
	Lukasz Majewski <lukma@denx.de>,
	Caleb Connolly <caleb.connolly@linaro.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Sumit Garg <sumit.garg@linaro.org>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 3/5] usb: gadget: CDC ACM: call usb_gadget_initialize
Date: Thu, 01 Feb 2024 14:37:02 +0100	[thread overview]
Message-ID: <87bk90mhkx.fsf@baylibre.com> (raw)
In-Reply-To: <20240131-b4-qcom-usb-v1-3-6438b2a2285e@linaro.org>

Hi Caleb,

Thank you for the patch.

On mer., janv. 31, 2024 at 14:57, Caleb Connolly <caleb.connolly@linaro.org> wrote:

> To actually use the gadget the peripheral driver must be probed and we
> must call g_dnl_clear_detach(). Otherwise acm_stdio_start() will always
> fail to find a UDC on DT platforms.
>
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

> ---
>  drivers/usb/gadget/f_acm.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
> index de42e0189e8d..ba216128ab27 100644
> --- a/drivers/usb/gadget/f_acm.c
> +++ b/drivers/usb/gadget/f_acm.c
> @@ -623,12 +623,21 @@ static void acm_stdio_puts(struct stdio_dev *dev, const char *str)
>  
>  static int acm_stdio_start(struct stdio_dev *dev)
>  {
> +	struct udevice *udc;
>  	int ret;
>  
>  	if (dev->priv) { /* function already exist */
>  		return 0;
>  	}
>  
> +	ret = udc_device_get_by_index(0, &udc);
> +	if (ret) {
> +		pr_err("USB init failed: %d\n", ret);
> +		return ret;
> +	}
> +
> +	g_dnl_clear_detach();
> +
>  	ret = g_dnl_register("usb_serial_acm");
>  	if (ret)
>  		return ret;
>
> -- 
> 2.43.0

  reply	other threads:[~2024-02-01 13:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 14:57 [PATCH 0/5] Qualcomm DWC3 USB support Caleb Connolly
2024-01-31 14:57 ` [PATCH 1/5] usb: dwc3-generic: implement Qualcomm wrapper Caleb Connolly
2024-02-01  9:34   ` Mattijs Korpershoek
2024-02-01 14:24     ` Caleb Connolly
2024-02-02  9:16       ` Mattijs Korpershoek
2024-02-06 20:36   ` Marek Vasut
2024-03-13 18:22     ` Caleb Connolly
2024-03-21  5:34       ` Marek Vasut
2024-03-21  9:25         ` Mattijs Korpershoek
2024-03-21 11:34           ` Caleb Connolly
2024-03-21 14:14             ` Mattijs Korpershoek
2024-01-31 14:57 ` [PATCH 2/5] usb: dwc3: select DM_USB_GADGET Caleb Connolly
2024-02-01 13:25   ` Mattijs Korpershoek
2024-01-31 14:57 ` [PATCH 3/5] usb: gadget: CDC ACM: call usb_gadget_initialize Caleb Connolly
2024-02-01 13:37   ` Mattijs Korpershoek [this message]
2024-01-31 14:57 ` [PATCH 4/5] usb: gadget: UMS: support multiple sector sizes Caleb Connolly
2024-02-01 13:49   ` Mattijs Korpershoek
2024-01-31 14:57 ` [PATCH 5/5] iommu: qcom-smmu: fix debugging Caleb Connolly
2024-02-01 13:51   ` Mattijs Korpershoek

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=87bk90mhkx.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=caleb.connolly@linaro.org \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=neil.armstrong@linaro.org \
    --cc=sumit.garg@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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.