Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754082AbdCOOn5 (ORCPT ); Wed, 15 Mar 2017 10:43:57 -0400 Received: from out.consiagnet.it ([83.149.128.196]:28474 "EHLO out.consiagnet.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753100AbdCOOmo (ORCPT ); Wed, 15 Mar 2017 10:42:44 -0400 X-Greylist: delayed 1972 seconds by postgrey-1.27 at vger.kernel.org; Wed, 15 Mar 2017 10:42:43 EDT X-Spam-Flag: NO X-Spam-Score: -2.901 From: Moreno Bartalucci To: Bin Liu Cc: linux-omap@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Alessio Igor Bogani , Moreno Bartalucci Subject: [PATCH] usb-musb: keep VBUS on when device is disconnected Date: Wed, 15 Mar 2017 15:08:01 +0100 Message-Id: <20170315140801.97230-1-moreno.bartalucci@tecnorama.it> X-Mailer: git-send-email 2.10.1 (Apple Git-78) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 912 Lines: 26 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. 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)