From patchwork Sun Mar 10 01:08:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 2242771 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AA7C43FCF2 for ; Sun, 10 Mar 2013 01:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751705Ab3CJBI1 (ORCPT ); Sat, 9 Mar 2013 20:08:27 -0500 Received: from mail-ee0-f42.google.com ([74.125.83.42]:37294 "EHLO mail-ee0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751713Ab3CJBIW (ORCPT ); Sat, 9 Mar 2013 20:08:22 -0500 Received: by mail-ee0-f42.google.com with SMTP id b47so1608593eek.1 for ; Sat, 09 Mar 2013 17:08:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=O/uPnAxjsnrPK676P9zgxUqELfC6XZsVAw13FYDAw2Y=; b=A2KOd0InqAh49D5sUy+f742/3b/JNfIvnuOpM7DpIwpzV9fc7UW3XWM9KVwLIcq6Xz v5GaUp0pD2gTPuLm6Zj3x7AdQE86lMc54IAu+wR9reQwDUpW+GJnMqldMAjA5002Q8Kw tRyQ1OhoOihzSRjWO+W1O/mWabXTwiY1qaqs/l3V7ctXi+98Ow23h5hpWHJBd7lt/C2t q5YUwAsRn8qDWX4h98MCWCfOkyNq/c9hiVH5Es+l3oXy+erj0O4ZCQrUIGNpwL1xCbhL lXUOG6Bmvg7wdtcrQv2hBVT+C1eyh/5/Vilth7mao7ILoikNU+5Qix+gAhDjhuYVEQuP y9hw== X-Received: by 10.14.204.195 with SMTP id h43mr21090120eeo.14.1362877700951; Sat, 09 Mar 2013 17:08:20 -0800 (PST) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt. [88.119.226.136]) by mx.google.com with ESMTPS id ca4sm12081493eeb.15.2013.03.09.17.08.19 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Mar 2013 17:08:20 -0800 (PST) From: Grazvydas Ignotas To: linux-usb@vger.kernel.org Cc: linux-omap@vger.kernel.org, Felipe Balbi , NeilBrown , Grazvydas Ignotas Subject: [PATCH 6/7] usb: musb: omap2430: turn off vbus on cable disconnect Date: Sun, 10 Mar 2013 03:08:00 +0200 Message-Id: <1362877681-8102-7-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362877681-8102-1-git-send-email-notasas@gmail.com> References: <1362877681-8102-1-git-send-email-notasas@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On USB_EVENT_ID event the musb glue enables VBUS by calling omap2430_musb_set_vbus(musb, 1) that sets the session bit, but on USB_EVENT_NONE reverse action is never made, and that breaks PM. Disable VBUS unconditionally on USB_EVENT_NONE to be sure musb session is ended on cable unplug so that PM works. Signed-off-by: Grazvydas Ignotas --- drivers/usb/musb/omap2430.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 2a39c11..d430677 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -296,6 +296,7 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue) pm_runtime_put_autosuspend(dev); } + omap2430_musb_set_vbus(musb, 0); if (data->interface_type == MUSB_INTERFACE_UTMI) { if (musb->xceiv->otg->set_vbus) otg_set_vbus(musb->xceiv->otg, 0);