Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966263AbdCXS7c (ORCPT ); Fri, 24 Mar 2017 14:59:32 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:58489 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934578AbdCXS7X (ORCPT ); Fri, 24 Mar 2017 14:59:23 -0400 Date: Fri, 24 Mar 2017 13:58:36 -0500 From: Bin Liu To: Moreno Bartalucci CC: "linux-omap@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Alessio Igor Bogani Subject: Re: [PATCH] usb-musb: keep VBUS on when device is disconnected Message-ID: <20170324185836.GC19814@uda0271908> Mail-Followup-To: Bin Liu , Moreno Bartalucci , "linux-omap@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Alessio Igor Bogani References: <20170315140801.97230-1-moreno.bartalucci@tecnorama.it> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170315140801.97230-1-moreno.bartalucci@tecnorama.it> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1325 Lines: 39 On Wed, Mar 15, 2017 at 09:08:01AM -0500, Moreno Bartalucci wrote: > With usb-musb port in host mode, when the device > is disconnected, either logically (because of a mode switch) or > physically (by pulling the cable), the USB port should keep > suppling VBUS, with no interruption, to prevent power loss on > USB powered devices. The usb device has been disconnected, why it still cares about VBUS power? Can you please give more details of the issue you try to solve? This logic has been there since the driver was added 5 years ago, so I really have to understand the issue before accept the change. Regards, -Bin. > > Signed-off-by: Moreno Bartalucci > --- > drivers/usb/musb/musb_dsps.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c > index 7c047c4..5d9986b 100644 > --- a/drivers/usb/musb/musb_dsps.c > +++ b/drivers/usb/musb/musb_dsps.c > @@ -245,7 +245,7 @@ static int dsps_check_status(struct musb *musb, void *unused) > dsps_mod_timer_optional(glue); > break; > case OTG_STATE_A_WAIT_BCON: > - musb_writeb(musb->mregs, MUSB_DEVCTL, 0); > + musb_writeb(musb->mregs, MUSB_DEVCTL, MUSB_DEVCTL_SESSION); > skip_session = 1; > /* fall */ > > -- > 2.10.1 (Apple Git-78) >