From patchwork Wed Jun 12 15:28:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: manjunath.goudar@linaro.org X-Patchwork-Id: 17845 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 641A623903 for ; Wed, 12 Jun 2013 15:29:21 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id 2sf10218443qea.5 for ; Wed, 12 Jun 2013 08:29:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=/y/C/YOy2IqMhVO/couG1tJHeLvvCF+qKj7WE7dJ5BA=; b=epTtGtvz8wrum5Os1vm9bSyHzt/7wnCzpTAPfR3DOMgrg9jhr/ug2mlrwzZhiHHOc7 4Vnm1t7RzkRV9AeQvtJV8N7w5hAFyFjVznWPR5ssqmvxuH7f7M5atUUB0VBTneS7FxmI KuyEni8KDW8VUC+7RhcU/RHlInDUpOXpz4ilLREKuzf+YfelD2LCuK4HTDUAaHS8wWx3 nuTFTYsCpq9vEzqN/1QxlbBw81FY96dnY7h5yLIXh8Pa8/lRXyjk1QCDRzWgFcNtGm8m 6X9UqkkHSwkKssZ0Hps/gQhEZBHHGedEnPfG0qYi384m92sVItl3r1GX/OT9h9lBwx2L sy0g== X-Received: by 10.224.200.202 with SMTP id ex10mr14048423qab.8.1371050961214; Wed, 12 Jun 2013 08:29:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.76.1 with SMTP id g1ls3539103qew.95.gmail; Wed, 12 Jun 2013 08:29:21 -0700 (PDT) X-Received: by 10.220.144.67 with SMTP id y3mr8739714vcu.17.1371050960978; Wed, 12 Jun 2013 08:29:20 -0700 (PDT) Received: from mail-ve0-x22d.google.com (mail-ve0-x22d.google.com [2607:f8b0:400c:c01::22d]) by mx.google.com with ESMTPS id i3si8769185vdw.139.2013.06.12.08.29.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:20 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22d is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22d; Received: by mail-ve0-f173.google.com with SMTP id jw11so6818042veb.4 for ; Wed, 12 Jun 2013 08:29:20 -0700 (PDT) X-Received: by 10.220.192.138 with SMTP id dq10mr9996478vcb.23.1371050960809; Wed, 12 Jun 2013 08:29:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.191.99 with SMTP id gx3csp148672vec; Wed, 12 Jun 2013 08:29:20 -0700 (PDT) X-Received: by 10.68.164.132 with SMTP id yq4mr18707295pbb.123.1371050959794; Wed, 12 Jun 2013 08:29:19 -0700 (PDT) Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by mx.google.com with ESMTPS id xx2si11843101pac.74.2013.06.12.08.29.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.179 is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=209.85.192.179; Received: by mail-pd0-f179.google.com with SMTP id q10so4138500pdj.24 for ; Wed, 12 Jun 2013 08:29:19 -0700 (PDT) X-Received: by 10.66.121.108 with SMTP id lj12mr24764567pab.52.1371050959426; Wed, 12 Jun 2013 08:29:19 -0700 (PDT) Received: from localhost.localdomain ([223.239.143.110]) by mx.google.com with ESMTPSA id ri8sm19557052pbc.3.2013.06.12.08.29.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:18 -0700 (PDT) From: Manjunath Goudar To: linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, patches@linaro.org, stern@rowland.harvard.edu, arnd@linaro.org, manjunath.goudar@linaro.org, linaro-dev@lists.linaro.org, Arnd Bergmann , Greg KH Subject: [PATCH 06/10] USB: OHCI: Properly handle ohci-omap suspend Date: Wed, 12 Jun 2013 20:58:34 +0530 Message-Id: <1371050918-29472-7-git-send-email-manjunath.goudar@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371050918-29472-1-git-send-email-manjunath.goudar@linaro.org> References: <1371050918-29472-1-git-send-email-manjunath.goudar@linaro.org> X-Gm-Message-State: ALoCoQlrHwjefvruW5ktQ79PQB+zym9D0QGAKdZqVqTRK3nWeGntsat5YVDh0JysHY8WuBHohYHC X-Original-Sender: manjunath.goudar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22d is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Suspend scenario in case of ohci-omap glue was not properly handled as it was not suspending generic part of ohci controller.Calling explicitly the ohci_suspend() routine in ohci_omap_suspend() will ensure proper handling of suspend scenario. Signed-off-by: Manjunath Goudar Cc: Arnd Bergmann Cc: Alan Stern Cc: Greg KH Cc: linux-usb@vger.kernel.org --- drivers/usb/host/ohci-omap.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index b900dba..a638a14 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c @@ -423,16 +423,21 @@ static int ohci_hcd_omap_drv_remove(struct platform_device *dev) #ifdef CONFIG_PM -static int ohci_omap_suspend(struct platform_device *dev, pm_message_t message) +static int ohci_omap_suspend(struct platform_device *pdev, pm_message_t message) { - struct ohci_hcd *ohci = hcd_to_ohci(platform_get_drvdata(dev)); + struct usb_hcd *hcd = platform_get_drvdata(pdev); + struct ohci_hcd *ohci = hcd_to_ohci(hcd); + bool do_wakeup = device_may_wakeup(&pdev->dev); + int ret; if (time_before(jiffies, ohci->next_statechange)) msleep(5); ohci->next_statechange = jiffies; + ret = ohci_suspend(hcd, do_wakeup); + omap_ohci_clock_power(0); - return 0; + return ret; } static int ohci_omap_resume(struct platform_device *dev)