From patchwork Thu Feb 17 12:38:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 569951 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1HCdjaS019925 for ; Thu, 17 Feb 2011 12:39:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756237Ab1BQMj3 (ORCPT ); Thu, 17 Feb 2011 07:39:29 -0500 Received: from na3sys009aog115.obsmtp.com ([74.125.149.238]:33597 "EHLO na3sys009aog115.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756226Ab1BQMj0 (ORCPT ); Thu, 17 Feb 2011 07:39:26 -0500 Received: from source ([209.85.214.47]) (using TLSv1) by na3sys009aob115.postini.com ([74.125.148.12]) with SMTP ID DSNKTV0W+6l6vw7x3UiNtBnREesgHtoAOZid@postini.com; Thu, 17 Feb 2011 04:39:25 PST Received: by mail-bw0-f47.google.com with SMTP id 10so2500143bwz.34 for ; Thu, 17 Feb 2011 04:39:23 -0800 (PST) Received: by 10.204.73.160 with SMTP id q32mr1620129bkj.155.1297946363659; Thu, 17 Feb 2011 04:39:23 -0800 (PST) Received: from localhost (cs181221087.pp.htv.fi [82.181.221.87]) by mx.google.com with ESMTPS id a17sm617688bku.11.2011.02.17.04.39.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 Feb 2011 04:39:23 -0800 (PST) From: Felipe Balbi To: Greg KH Cc: Linux USB Mailing List , Linux OMAP Mailing List , Hema HK , Tony Lindgren , Paul Walmsley , Felipe Balbi Subject: [patch-v2.6.39 09/12] usb: otg: TWL6030: Introduce the twl6030_phy_suspend function. Date: Thu, 17 Feb 2011 14:38:46 +0200 Message-Id: <1297946329-9353-10-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.4.rc2 In-Reply-To: <1297946329-9353-1-git-send-email-balbi@ti.com> References: <1297946329-9353-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 17 Feb 2011 12:39:45 +0000 (UTC) diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c index 88989e6..b4eda02 100644 --- a/drivers/usb/otg/twl6030-usb.c +++ b/drivers/usb/otg/twl6030-usb.c @@ -177,6 +177,17 @@ static void twl6030_phy_shutdown(struct otg_transceiver *x) pdata->phy_power(twl->dev, 0, 0); } +static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend) +{ + struct twl6030_usb *twl = xceiv_to_twl(x); + struct device *dev = twl->dev; + struct twl4030_usb_data *pdata = dev->platform_data; + + pdata->phy_suspend(dev, suspend); + + return 0; +} + static int twl6030_usb_ldo_init(struct twl6030_usb *twl) { @@ -388,6 +399,7 @@ static int __devinit twl6030_usb_probe(struct platform_device *pdev) twl->otg.set_vbus = twl6030_set_vbus; twl->otg.init = twl6030_phy_init; twl->otg.shutdown = twl6030_phy_shutdown; + twl->otg.set_suspend = twl6030_phy_suspend; /* init spinlock for workqueue */ spin_lock_init(&twl->lock); @@ -432,6 +444,7 @@ static int __devinit twl6030_usb_probe(struct platform_device *pdev) twl->asleep = 0; pdata->phy_init(dev); + twl6030_phy_suspend(&twl->otg, 0); twl6030_enable_irq(&twl->otg); dev_info(&pdev->dev, "Initialized TWL6030 USB module\n");