[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170511202726.GZ3489@atomide.com>
Date: Thu, 11 May 2017 13:27:27 -0700
From: Tony Lindgren <tony@...mide.com>
To: Bin Liu <b-liu@...com>,
Moreno Bartalucci <moreno.bartalucci@...norama.it>,
Lars Melin <larsm17@...il.com>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Alessio Igor Bogani <abogani@...nel.org>
Subject: Re: [PATCH] usb-musb: keep VBUS on when device is disconnected
* Tony Lindgren <tony@...mide.com> [170511 13:26]:
> diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
> --- a/drivers/usb/musb/musb_dsps.c
> +++ b/drivers/usb/musb/musb_dsps.c
> @@ -270,6 +270,10 @@ static int dsps_check_status(struct musb *musb, void *unused)
> musb_writel(musb->ctrl_base, wrp->coreintr_set,
> MUSB_INTR_VBUSERROR << wrp->usb_shift);
> break;
> + case OTG_STATE_A_HOST:
> + if (glue->vbus_irq)
> + dsps_mod_timer(glue, 20000); /* 20s */
> + break;
> default:
> break;
> }
> --
Heh that's the wrong way around.. I think we can leave out the check
for vbus_irq.
8< ---------------
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -270,6 +270,10 @@ static int dsps_check_status(struct musb *musb, void *unused)
musb_writel(musb->ctrl_base, wrp->coreintr_set,
MUSB_INTR_VBUSERROR << wrp->usb_shift);
break;
+ case OTG_STATE_A_HOST:
+ /* Keep VBUS on after disconnect for 20 seconds */
+ dsps_mod_timer(glue, 20000);
+ break;
default:
break;
}
--
2.13.0
Powered by blists - more mailing lists