From patchwork Sun Mar 17 18:23:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 2284251 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 694CB3FD8C for ; Sun, 17 Mar 2013 18:23:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932710Ab3CQSXu (ORCPT ); Sun, 17 Mar 2013 14:23:50 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:47857 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932688Ab3CQSXr (ORCPT ); Sun, 17 Mar 2013 14:23:47 -0400 Received: by mail-ee0-f45.google.com with SMTP id b57so2243910eek.18 for ; Sun, 17 Mar 2013 11:23:45 -0700 (PDT) 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=8LnuNfaXqYVb4Ahf/1UHk8MDNFZHOk2jMhyprihq358=; b=yCM4wNRaYd4AGC62bmM9B5VfgS17WA3hXfwaCG81qShvSpMyRllt2TdqOhaCDu68fY efEQNa0c2nXPzU72oKbTBZ8uAzFCHH8OMI4xSKsLbYL7DU/Le7lOVK6F8BLR2auUO38U uMNCu8ps4CRnVeCDetZ+yo5Y1hOJUrvjGH1b+5X71uQjQ4ULO4xqD576YPJWtbpcsrpE 2D69JRxB28sV5trv3MKVYQzQL1WMK7WAN+OnmHoc98EaacH+ydPm5/rqPU2w/pLArUaA 6MSCqDA0BlbimyRl2ffdOfKCc4Kzi8QI/WKDFGe8pRRYc6hUn4CWnEmx4QMMHIzCY5fr iQRA== X-Received: by 10.14.173.67 with SMTP id u43mr40937246eel.22.1363544625759; Sun, 17 Mar 2013 11:23:45 -0700 (PDT) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt. [88.119.226.136]) by mx.google.com with ESMTPS id a1sm22724358eep.2.2013.03.17.11.23.43 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Mar 2013 11:23:44 -0700 (PDT) From: Grazvydas Ignotas To: linux-usb@vger.kernel.org Cc: linux-omap@vger.kernel.org, Felipe Balbi , NeilBrown , kishon , Grazvydas Ignotas Subject: [PATCHv2 3/7] usb: phy: twl4030-usb: don't switch the phy on/off needlessly Date: Sun, 17 Mar 2013 20:23:23 +0200 Message-Id: <1363544607-17634-4-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1363544607-17634-1-git-send-email-notasas@gmail.com> References: <1363544607-17634-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 With runtime_pm in place there is no longer need to turn the phy on/off in OTG layer on cable connect/disconnect, OMAP glue does this through otg.set_suspend() callback after it's called through omap_musb_mailbox() on VBUS/ID interrupt. Not doing this will save power when cable is connected but no gadget driver is loaded. This will also have side effect of automatic USB charging no longer working without twl4030_charger driver, because a regulator needed for charging will no longer be enabled, so be sure to enable charger driver if charging is needed. Signed-off-by: Grazvydas Ignotas --- drivers/usb/phy/phy-twl4030-usb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/usb/phy/phy-twl4030-usb.c b/drivers/usb/phy/phy-twl4030-usb.c index 305463b..b53a2a2 100644 --- a/drivers/usb/phy/phy-twl4030-usb.c +++ b/drivers/usb/phy/phy-twl4030-usb.c @@ -506,12 +506,6 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl) * USB_LINK_VBUS state. musb_hdrc won't care until it * starts to handle softconnect right. */ - if (status == OMAP_MUSB_VBUS_OFF || - status == OMAP_MUSB_ID_FLOAT) - twl4030_phy_suspend(twl, 0); - else - twl4030_phy_resume(twl); - omap_musb_mailbox(twl->linkstat); } sysfs_notify(&twl->dev->kobj, NULL, "vbus");