[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140430160625.GF23679@saruman.home>
Date: Wed, 30 Apr 2014 11:06:25 -0500
From: Felipe Balbi <balbi@...com>
To: Paul Fertser <fercerpav@...il.com>
CC: Li Yang <leoli@...escale.com>, Felipe Balbi <balbi@...com>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: gadget: fsl: check vbus presence on probe
On Thu, Apr 24, 2014 at 12:54:13PM +0400, Paul Fertser wrote:
> If VBUS is already present during the driver initialisation, the
s/initialisation/initialization
> corresponding IRQ never fires, so there is no way the gadget can get
> enumerated.
>
> This patch is real-life tested on an i.MX25 board with VBUS constantly
> hooked up.
>
> Signed-off-by: Paul Fertser <fercerpav@...il.com>
> ---
> drivers/usb/gadget/fsl_udc_core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
> index a2f26cd..b4b1516 100644
> --- a/drivers/usb/gadget/fsl_udc_core.c
> +++ b/drivers/usb/gadget/fsl_udc_core.c
> @@ -2501,6 +2501,11 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
> if (ret)
> goto err_del_udc;
>
> + /* Now let it settle a bit and sense VBUS */
> + msleep_interruptible(1);
> + if (fsl_readl(&dr_regs->otgsc) & OTGSC_STS_B_SESSION_VALID)
> + udc_controller->vbus_active = 1;
good fix, should this go to stable ?
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists