From patchwork Mon Apr 22 13:43:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Poddar, Sourav" X-Patchwork-Id: 2471951 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4E683DF23A for ; Mon, 22 Apr 2013 13:45:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753950Ab3DVNpt (ORCPT ); Mon, 22 Apr 2013 09:45:49 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:35599 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753809Ab3DVNoQ (ORCPT ); Mon, 22 Apr 2013 09:44:16 -0400 Received: from dbdlxv05.itg.ti.com ([172.24.171.60]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3MDiCH4024229; Mon, 22 Apr 2013 08:44:13 -0500 Received: from DBDE70.ent.ti.com (dbde70.ent.ti.com [172.24.170.148]) by dbdlxv05.itg.ti.com (8.14.3/8.13.8) with ESMTP id r3MDi3rJ031200; Mon, 22 Apr 2013 08:44:10 -0500 Received: from dbdp33.itg.ti.com (172.24.170.252) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Mon, 22 Apr 2013 19:14:07 +0530 Received: from a0131647.apr.dhcp.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id r3MDhxTI004666; Mon, 22 Apr 2013 19:14:07 +0530 From: Sourav Poddar To: , , , CC: , , , Sourav Poddar , Santosh Shilimkar , Felipe Balbi , Rajendra nayak , Grygorii Strashko Subject: [RFC/PATCHv2 5/5] arm: omap2+: omap_device: remove no_idle_on_suspend Date: Mon, 22 Apr 2013 19:13:57 +0530 Message-ID: <1366638237-6880-6-git-send-email-sourav.poddar@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1366638237-6880-1-git-send-email-sourav.poddar@ti.com> References: <1366638237-6880-1-git-send-email-sourav.poddar@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Remove the "OMAP_DEVICE_NO_IDLE_ON_SUSPEND" check, since driver should be able to prevent idling of an omap device whenever required. Cc: Santosh Shilimkar Cc: Felipe Balbi Cc: Rajendra nayak Cc: Grygorii Strashko Signed-off-by: Sourav Poddar Reviewed-by: Felipe Balbi --- Hi Kevin, I have put this as an RFC, due to few comments on cover letter of the previous version by Grygorii Strashko. As, he has mentioned that there are Audio playback use cases which also requires "no_idle_on_suspend" and using them on mainline after this series can cause regression. What you think will be the right approach on this in relation to this patch? I mean every driver(if possible) should prevent runtime PM for no_idle_on_suspend usecase and we get rid of this OMAP_DEVICE_NO_IDLE_ON_SUSPEND check? OR we should drop this patch as of now? Hi Grygorii, Is it possible to handle ABE no_idle_on_suspend uscase the way I am trying to handle it for UART in the 2nd patch of this series? arch/arm/mach-omap2/omap_device.c | 12 +++--------- arch/arm/mach-omap2/omap_device.h | 10 ---------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 381be7a..2043d71 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@ -170,9 +170,6 @@ static int omap_device_build_from_dt(struct platform_device *pdev) r->name = dev_name(&pdev->dev); } - if (of_get_property(node, "ti,no_idle_on_suspend", NULL)) - omap_device_disable_idle_on_suspend(pdev); - pdev->dev.pm_domain = &omap_device_pm_domain; odbfd_exit1: @@ -620,11 +617,9 @@ static int _od_suspend_noirq(struct device *dev) ret = pm_generic_suspend_noirq(dev); if (!ret && !pm_runtime_status_suspended(dev)) { - if (pm_generic_runtime_suspend(dev) == 0) { - if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)) - omap_device_idle(pdev); + if (pm_generic_runtime_suspend(dev) == 0) + omap_device_idle(pdev); od->flags |= OMAP_DEVICE_SUSPENDED; - } } return ret; @@ -638,8 +633,7 @@ static int _od_resume_noirq(struct device *dev) if ((od->flags & OMAP_DEVICE_SUSPENDED) && !pm_runtime_status_suspended(dev)) { od->flags &= ~OMAP_DEVICE_SUSPENDED; - if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)) - omap_device_enable(pdev); + omap_device_enable(pdev); pm_generic_runtime_resume(dev); } diff --git a/arch/arm/mach-omap2/omap_device.h b/arch/arm/mach-omap2/omap_device.h index 044c31d..17ca1ae 100644 --- a/arch/arm/mach-omap2/omap_device.h +++ b/arch/arm/mach-omap2/omap_device.h @@ -38,7 +38,6 @@ extern struct dev_pm_domain omap_device_pm_domain; /* omap_device.flags values */ #define OMAP_DEVICE_SUSPENDED BIT(0) -#define OMAP_DEVICE_NO_IDLE_ON_SUSPEND BIT(1) /** * struct omap_device - omap_device wrapper for platform_devices @@ -101,13 +100,4 @@ static inline struct omap_device *to_omap_device(struct platform_device *pdev) { return pdev ? pdev->archdata.od : NULL; } - -static inline -void omap_device_disable_idle_on_suspend(struct platform_device *pdev) -{ - struct omap_device *od = to_omap_device(pdev); - - od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND; -} - #endif