From patchwork Wed Jun 12 15:28:31 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: 17842 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ea0-f197.google.com (mail-ea0-f197.google.com [209.85.215.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AD9DC23903 for ; Wed, 12 Jun 2013 15:29:10 +0000 (UTC) Received: by mail-ea0-f197.google.com with SMTP id a15sf5996104eae.8 for ; Wed, 12 Jun 2013 08:29:09 -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=93LVE/DTkZGQhhhkmhxD/LwtH/t7BwNQmSSWZj5GlVo=; b=iK7Ub1Q6d0ANBYKHHj+t44l0pCLHaPfUV8ru4aGUi+65DyYHT9ob2JceSSm/atw6Yz 7cmN2ZJFqM4E2BaO85yH8uiNR4INYMqPUQ8kQaLgI6PngBg/BYFQE5cwP0NlsFhk+SNA xXsR7nETpy7F3kllOdtPEhSAXlz9vBMm2w5WKZtuykeKwsnaIHVmzv5p5QhyDdvbo8Mn L03JqSW5Vhc76sWKga1+5nSEkijNGepej1KLJ7HP42lPVKpagjOJoHYznJm7z7fVHpey C22W0pHalVJPxbL698TU+81I6gNoGrJGVYQtDDHG73SxjjdpbJpjNQhCwPDm/yBb8EDD eaLg== X-Received: by 10.180.11.239 with SMTP id t15mr4157749wib.3.1371050949904; Wed, 12 Jun 2013 08:29:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.80.168 with SMTP id s8ls186093wix.29.gmail; Wed, 12 Jun 2013 08:29:09 -0700 (PDT) X-Received: by 10.180.99.232 with SMTP id et8mr4824737wib.17.1371050949803; Wed, 12 Jun 2013 08:29:09 -0700 (PDT) Received: from mail-ve0-x235.google.com (mail-ve0-x235.google.com [2607:f8b0:400c:c01::235]) by mx.google.com with ESMTPS id bu8si7436480wjc.13.2013.06.12.08.29.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:09 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::235 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::235; Received: by mail-ve0-f181.google.com with SMTP id db10so6769834veb.40 for ; Wed, 12 Jun 2013 08:29:08 -0700 (PDT) X-Received: by 10.58.251.144 with SMTP id zk16mr2237574vec.37.1371050948623; Wed, 12 Jun 2013 08:29:08 -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 gx3csp148664vec; Wed, 12 Jun 2013 08:29:08 -0700 (PDT) X-Received: by 10.68.231.65 with SMTP id te1mr20139105pbc.98.1371050947534; Wed, 12 Jun 2013 08:29:07 -0700 (PDT) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [2607:f8b0:400e:c03::235]) by mx.google.com with ESMTPS id tr9si9704544pbc.103.2013.06.12.08.29.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:07 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c03::235 is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=2607:f8b0:400e:c03::235; Received: by mail-pa0-f53.google.com with SMTP id tj12so5004618pac.40 for ; Wed, 12 Jun 2013 08:29:07 -0700 (PDT) X-Received: by 10.66.117.98 with SMTP id kd2mr24177580pab.160.1371050947008; Wed, 12 Jun 2013 08:29:07 -0700 (PDT) Received: from localhost.localdomain ([223.239.143.110]) by mx.google.com with ESMTPSA id ri8sm19557052pbc.3.2013.06.12.08.29.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Jun 2013 08:29:06 -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 03/10] USB: OHCI: Properly handle ohci-da8xx suspend Date: Wed, 12 Jun 2013 20:58:31 +0530 Message-Id: <1371050918-29472-4-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: ALoCoQmvmdIZqZyikFZniSuX8Ifr+4w+8P1Vw6+qyCidGgWNbtIvxDaYW+AJ7F6VQtkDCgEOBsrA X-Original-Sender: manjunath.goudar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::235 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-da8xx glue was not properly handled as it was not suspending generic part of ohci controller.Calling explicitly the ohci_suspend() routine in ohci_da8xx_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-da8xx.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index 6aaa9c9..3b1d9bd 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -406,19 +406,24 @@ static int ohci_hcd_da8xx_drv_remove(struct platform_device *dev) } #ifdef CONFIG_PM -static int ohci_da8xx_suspend(struct platform_device *dev, pm_message_t message) +static int ohci_da8xx_suspend(struct platform_device *pdev, + pm_message_t message) { - struct usb_hcd *hcd = 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); + ohci_da8xx_clock(0); hcd->state = HC_STATE_SUSPENDED; - dev->dev.power.power_state = PMSG_SUSPEND; - return 0; + pdev->dev.power.power_state = PMSG_SUSPEND; + return ret; } static int ohci_da8xx_resume(struct platform_device *dev)