From patchwork Sun Mar 10 01:07:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 2242791 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 7F9EF3FCF2 for ; Sun, 10 Mar 2013 01:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751778Ab3CJBIZ (ORCPT ); Sat, 9 Mar 2013 20:08:25 -0500 Received: from mail-ea0-f181.google.com ([209.85.215.181]:34694 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751430Ab3CJBIR (ORCPT ); Sat, 9 Mar 2013 20:08:17 -0500 Received: by mail-ea0-f181.google.com with SMTP id z10so683407ead.40 for ; Sat, 09 Mar 2013 17:08:16 -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=Wt/SUeuEkpoFUIZozjhsIf9fAVK/75daPGnDLeMpA1E=; b=q/CErDGRjVRgOsof2uETEetI/n7EFNMhQCVEa7J92wnOOoq2xVJXxVLM+ScgJ0+eqi ECL5Z2Dmg4yEnmKMoMolyGtuvr0XolfiyK4toOJ1elnkFp7CBfSXvkzjC/ExdzM5SuS5 /3qPUV6MMBhylQze0fzaWWIcxSJE4iF8uB/6XJrJWzi2t5U6KWCXM7ApqqoJpOKM1d3A Kr7PVtM5Ps2HmM40DQe1YR/Zj77FtYn8ZF0A72CIDT/rrCXYhY9kXHzbsFlHS0qAkGFU zSfpDE1yakXRHpdEnbPdlx+309Ab1mBZT/fNPe4/XKerT+kUWnR4GAZobbAiSG7qsIZW o0Lg== X-Received: by 10.14.223.69 with SMTP id u45mr10082482eep.23.1362877695976; Sat, 09 Mar 2013 17:08:15 -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.14 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Mar 2013 17:08:15 -0800 (PST) From: Grazvydas Ignotas To: linux-usb@vger.kernel.org Cc: linux-omap@vger.kernel.org, Felipe Balbi , NeilBrown , Grazvydas Ignotas Subject: [PATCH 3/7] usb: otg: twl4030-usb: don't switch the phy on/off needlessly Date: Sun, 10 Mar 2013 03:07:57 +0200 Message-Id: <1362877681-8102-4-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 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, so be sure to enable it if charging is needed. Signed-off-by: Grazvydas Ignotas --- drivers/usb/otg/twl4030-usb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 0ea576a..90a19ff 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/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");