From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758115AbdELRkl (ORCPT ); Fri, 12 May 2017 13:40:41 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:28281 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756114AbdELRki (ORCPT ); Fri, 12 May 2017 13:40:38 -0400 Date: Fri, 12 May 2017 12:40:26 -0500 From: Bin Liu To: Tony Lindgren CC: Moreno Bartalucci , Lars Melin , "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: <20170512174026.GB651@uda0271908> Mail-Followup-To: Bin Liu , Tony Lindgren , Moreno Bartalucci , Lars Melin , "linux-omap@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Alessio Igor Bogani References: <20170511192013.GA4459@uda0271908> <20170511193810.GX3489@atomide.com> <20170511200220.GH7154@uda0271908> <20170511202306.GY3489@atomide.com> <20170511204406.GI7154@uda0271908> <20170511210628.GA3489@atomide.com> <20170512134042.GK7154@uda0271908> <20170512145849.GE3489@atomide.com> <20170512152144.GA651@uda0271908> <20170512172134.GI3489@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170512172134.GI3489@atomide.com> 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 On Fri, May 12, 2017 at 10:21:35AM -0700, Tony Lindgren wrote: > * Bin Liu [170512 08:24]: > > On Fri, May 12, 2017 at 07:58:49AM -0700, Tony Lindgren wrote: > > > OK. No better ideas except I think we should probably have a separate > > > timer for keeping VBUS on after state changes eventually. > > > > Currently with the patch below, VBUS is constantly on for host-only > > mode, and this is what we want. Why we need a separate timer? No one > > cuts VBUs now for host-only mode. > > Oh I was just thinking what we might want to do in the future if > we want to cut off VBUS when no devices are connected. If we have Okay, I see. But I don't think we will ever want to turn off VBUS when no devices attached for host-only mode. Any other controllers do this? Turning off VBUS doesn't save us much, because it comes from an external power rail, and no one consumes it when no devices are attached. I believe keeping the controller idle as what we have now is sufficient. Regards, -Bin. > a USB modem for example it might first enumerate as some boot device, > then nothing for 20 seconds while it's booting, and then we have a > different device enumerating after the modem has booted. During this > period we want to keep VBUS on and will go through multiple > OTG_STATE_A_WAIT_BCON states. So we can't really control VBUS using > the OTG_STATE_WHATEVER alone. > > Regards, > > Tony