From patchwork Wed Jun 12 15:28:37 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: 17848 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D6A1323903 for ; Wed, 12 Jun 2013 15:29:33 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id n1sf3202672qcx.7 for ; Wed, 12 Jun 2013 08:29:33 -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=eD0ZGw51UkGgfeXcY2c5tcoD3At65ro5WN/CWAPM3og=; b=YiGnJmSsDrt+sg0ezng19LVbZzZzxuVPDy9pPjckznmJu+DXi7xyKSSPZkbwASDTbF 2Gk+as9OtJ/vhUJWywyM6pZI6LMf/PLRqdIOhjv19fGCjkBD/N4gVanIL61iqlrbJuuT mKCLj3xF6KiLophViNFn/raqFCtAmfIP1EqKDx6cw3jPYtSsfrcapASDsQZR4mTBkF70 ZU2l5S1oOCRsn2IdWD/D2RKswhZ0aLnWsECNbOWAcTY7GAzPBObAsAoqAg1+33WROC35 8Tz/3Ulki2XPEJqvt7nmlBnPXZ8ZB92Z+XT1PgypxgPy+D7Qx/SEu+ECdxsL7MjqYm+T g7Ng== X-Received: by 10.224.53.198 with SMTP id n6mr14097009qag.2.1371050973577; Wed, 12 Jun 2013 08:29:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.129.69 with SMTP id nu5ls1426499qeb.88.gmail; Wed, 12 Jun 2013 08:29:33 -0700 (PDT) X-Received: by 10.52.243.234 with SMTP id xb10mr8531270vdc.68.1371050973349; Wed, 12 Jun 2013 08:29:33 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id 3si6181348vcd.13.2013.06.12.08.29.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id ib11so6464656vcb.3 for ; Wed, 12 Jun 2013 08:29:33 -0700 (PDT) X-Received: by 10.220.215.73 with SMTP id hd9mr10029443vcb.19.1371050973033; Wed, 12 Jun 2013 08:29:33 -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 gx3csp148681vec; Wed, 12 Jun 2013 08:29:32 -0700 (PDT) X-Received: by 10.66.102.6 with SMTP id fk6mr25166479pab.184.1371050971956; Wed, 12 Jun 2013 08:29:31 -0700 (PDT) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by mx.google.com with ESMTPS id e8si11842707pao.78.2013.06.12.08.29.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.176 is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=209.85.192.176; Received: by mail-pd0-f176.google.com with SMTP id t12so5320262pdi.35 for ; Wed, 12 Jun 2013 08:29:31 -0700 (PDT) X-Received: by 10.66.224.73 with SMTP id ra9mr24435249pac.163.1371050971567; Wed, 12 Jun 2013 08:29:31 -0700 (PDT) Received: from localhost.localdomain ([223.239.143.110]) by mx.google.com with ESMTPSA id ri8sm19557052pbc.3.2013.06.12.08.29.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:30 -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 09/10] USB: OHCI: Properly handle ohci-sm501 suspend Date: Wed, 12 Jun 2013 20:58:37 +0530 Message-Id: <1371050918-29472-10-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: ALoCoQmMe8mVYkkVzrP20//KwDep8k2tqAJ26fmxFLz25/HhZIA9JQhWsjBAq2oZvqiIiONuJIJz X-Original-Sender: manjunath.goudar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 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-sm501 glue was not properly handled as it was not suspending generic part of ohci controller.Calling explicitly the ohci_suspend() routine in ohci_sm501_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-sm501.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c index d479d5d..f4f2da0 100644 --- a/drivers/usb/host/ohci-sm501.c +++ b/drivers/usb/host/ohci-sm501.c @@ -216,14 +216,19 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev) static int ohci_sm501_suspend(struct platform_device *pdev, pm_message_t msg) { struct device *dev = &pdev->dev; - struct ohci_hcd *ohci = hcd_to_ohci(platform_get_drvdata(pdev)); + struct usb_hcd *hcd = platform_get_drvdata(pdev); + struct ohci_hcd *ohci = hcd_to_ohci(hcd); + bool do_wakeup = device_may_wakeup(dev); + int ret; if (time_before(jiffies, ohci->next_statechange)) msleep(5); ohci->next_statechange = jiffies; + ret = ohci_suspend(hcd, do_wakeup); + sm501_unit_power(dev->parent, SM501_GATE_USB_HOST, 0); - return 0; + return ret; } static int ohci_sm501_resume(struct platform_device *pdev)