From patchwork Fri Jun 5 07:55:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 28084 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n557xHAJ024897 for ; Fri, 5 Jun 2009 07:59:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754821AbZFEH6X (ORCPT ); Fri, 5 Jun 2009 03:58:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754719AbZFEH6X (ORCPT ); Fri, 5 Jun 2009 03:58:23 -0400 Received: from rv-out-0506.google.com ([209.85.198.234]:27625 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754821AbZFEH6X (ORCPT ); Fri, 5 Jun 2009 03:58:23 -0400 Received: by rv-out-0506.google.com with SMTP id k40so290502rvb.5 for ; Fri, 05 Jun 2009 00:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=i87aG4kAPjuXIwhU+jZrZINYJxsw+0rQ+gm5mpM8JVE=; b=UuWzpnNmZylehFpBXJvOJocAN4xt+ZCbFQ+j52VEPqr2LTi22EXt3geS9rsUjUYhK3 yisDz/LOyE/93B9nT6b4zqA1x68rB/xsHCHys9ljkAV+8ae5/dDxlQHlgpilN4mCgY0t /1ysQ+MbfWp9Rx247ExpmagjNoks7UlXWalaM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=KyrU0x+h8uYcIai26qfIdB6C+hq95ig7qvzxY49JYUGNAhytAdnQF77VhlxJLC9G9V d/1ZfidqdQ+qjmFfcaLHJjIdNaO4nPkFVwFhWgrsPjrGa0NsVbBoDEQvCFFvW+RL0KFf qAbfoVu29BqGeQ7t2nHdOuGPm8sxBiOx+8nEk= Received: by 10.140.127.20 with SMTP id z20mr2688890rvc.187.1244188705283; Fri, 05 Jun 2009 00:58:25 -0700 (PDT) Received: from rx1.opensource.se (mailhost.igel.co.jp [219.106.231.130]) by mx.google.com with ESMTPS id b8sm30908147rvf.24.2009.06.05.00.58.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Jun 2009 00:58:24 -0700 (PDT) From: Magnus Damm To: linux-pm@lists.linux-foundation.org Cc: ben-linux@fluff.org, hskinnemoen@atmel.com, anemo@mba.ocn.ne.jp, gregkh@suse.de, rjw@sisk.pl, stern@rowland.harvard.edu, pavel@ucw.cz, felipe.balbi@nokia.com, linux-omap@vger.kernel.org, Magnus Damm Date: Fri, 05 Jun 2009 16:55:04 +0900 Message-Id: <20090605075504.14756.68449.sendpatchset@rx1.opensource.se> In-Reply-To: <20090605075436.14756.80501.sendpatchset@rx1.opensource.se> References: <20090605075436.14756.80501.sendpatchset@rx1.opensource.se> Subject: [PATCH 03/07] dma: rework txx9dmac suspend_late()/resume_early() Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Magnus Damm This patch reworks platform driver power management code for txx9dmac from legacy late/early callbacks to dev_pm_ops. The callbacks are converted for CONFIG_SUSPEND like this: suspend_late() -> suspend_noirq() resume_early() -> resume_noirq() Signed-off-by: Magnus Damm --- Untested but compiles fine. drivers/dma/txx9dmac.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/dma/txx9dmac.c +++ work/drivers/dma/txx9dmac.c 2009-06-01 16:34:23.000000000 +0900 @@ -1287,17 +1287,18 @@ static void txx9dmac_shutdown(struct pla txx9dmac_off(ddev); } -static int txx9dmac_suspend_late(struct platform_device *pdev, - pm_message_t mesg) +static int txx9dmac_suspend_noirq(struct device *dev) { + struct platform_device *pdev = to_platform_device(dev); struct txx9dmac_dev *ddev = platform_get_drvdata(pdev); txx9dmac_off(ddev); return 0; } -static int txx9dmac_resume_early(struct platform_device *pdev) +static int txx9dmac_resume_noirq(struct device *dev) { + struct platform_device *pdev = to_platform_device(dev); struct txx9dmac_dev *ddev = platform_get_drvdata(pdev); struct txx9dmac_platform_data *pdata = pdev->dev.platform_data; u32 mcr; @@ -1310,6 +1311,11 @@ static int txx9dmac_resume_early(struct } +static struct dev_pm_ops txx9dmac_dev_pm_ops = { + .suspend_noirq = txx9dmac_suspend_noirq, + .resume_noirq = txx9dmac_resume_noirq, +}; + static struct platform_driver txx9dmac_chan_driver = { .remove = __exit_p(txx9dmac_chan_remove), .driver = { @@ -1320,10 +1326,9 @@ static struct platform_driver txx9dmac_c static struct platform_driver txx9dmac_driver = { .remove = __exit_p(txx9dmac_remove), .shutdown = txx9dmac_shutdown, - .suspend_late = txx9dmac_suspend_late, - .resume_early = txx9dmac_resume_early, .driver = { .name = "txx9dmac", + .pm = &txx9dmac_dev_pm_ops, }, };