From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH/RFC 4/4] OMAP2/3 MMC: initial conversion to runtime PM Date: Tue, 16 Feb 2010 16:50:34 -0600 Message-ID: <87d404kd6t.fsf@deeprootsystems.com> References: <1265244688-4055-1-git-send-email-khilman@deeprootsystems.com> <1265244688-4055-5-git-send-email-khilman@deeprootsystems.com> <4B6BD2FF.6050806@nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-iw0-f185.google.com ([209.85.223.185]:39668 "EHLO mail-iw0-f185.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933181Ab0BPWuh (ORCPT ); Tue, 16 Feb 2010 17:50:37 -0500 Received: by iwn15 with SMTP id 15so5800051iwn.19 for ; Tue, 16 Feb 2010 14:50:36 -0800 (PST) In-Reply-To: <4B6BD2FF.6050806@nokia.com> (Adrian Hunter's message of "Fri\, 05 Feb 2010 10\:12\:47 +0200") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Adrian Hunter Cc: "linux-omap@vger.kernel.org" , Paul Walmsley Adrian Hunter writes: > Kevin Hilman wrote: >> Convert the HSMMC driver to use the runtime PM layer. A notable >> aspect of this is that the use of the dev_attr data from the >> omap_hwmod allows the redaction of all of the integration-specific >> hacks inside this driver. Regulator control has not yet been >> converted; the driver still uses the platform_data set_power hook. >> >> In converting to runtime PM layer, the clock frameworks is no longer >> used for fclk and iclk. Instead, the runtime PM get and put functions >> are used. These result in calls into the OMAP runtime PM core which >> internally uses the omap_device API to disable/re-enable the device. >> (Note that the 2430 debounce clock is not currently handled here, >> only the fclk and iclk are managed.) >> >> In addition, the context_loss tracking has been removed from the >> driver and is now handled by omap_device + runtime PM core. The >> driver's ->runtime_suspend() hook will be called before device is >> disabled, and the driver's ->runtime_resume() hook will be called if >> context has been lost. >> >> Based on an initial conversion of this driver to use omap_device by >> by Paul Walmsely: http://marc.info/?l=linux-omap&m=124419789124570&w=2 >> and then converted to use runtime PM API instead of omap_device API. >> >> The omap_hsmmc driver has some hacks in this version to compensate for >> the fact that the main runtime PM core prevents runtime transitions >> during suspend. This prevens us from using common hooks for runtime >> PM and static PM. Current workaround is to hack in some extra put/get >> calls in the suspend/resume path while this issue is being discussed >> on linux-pm. >> >> Cc: Paul Walmsley >> Signed-off-by: Kevin Hilman >> --- >> arch/arm/mach-omap2/devices.c | 152 +++++++++-------------- >> arch/arm/mach-omap2/hsmmc.c | 12 +- >> arch/arm/plat-omap/include/plat/mmc.h | 5 + >> drivers/mmc/host/omap_hsmmc.c | 226 +++++++++++++++------------------ >> 4 files changed, 176 insertions(+), 219 deletions(-) > > Why is PM runtime not simply PM? > > Can pm_runtime_put_sync() and pm_runtime_get_sync() have less obscure names? The runtime PM names are not my creation. This is a new PM framework in mainline that I am taking advantage of. See: http://elinux.org/OMAP_Power_Management#Run-time_PM Kevin