[PATCH v3 5/6] OMAP: omap_device: Create a default omap_device_pm_latency
From: Kevin Hilman <hidden>
Date: 2011-09-27 18:29:51
Also in:
linux-omap
Tony Lindgren [off-list ref] writes:
* Benoit Cousson [off-list ref] [110927 09:45]:quoted
Most devices are using the same default omap_device_pm_latency structure during device built. In order to avoid the duplication of the same structure everywhere, add a default structure that will be used if the device does not have an explicit one. Next patches will clean the duplicated structures. Signed-off-by: Benoit Cousson <redacted> Cc: Kevin Hilman <redacted> Cc: Paul Walmsley <paul@pwsan.com> --- arch/arm/plat-omap/omap_device.c | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-)diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index f832f92..cd8d977 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c@@ -97,6 +97,14 @@ static int omap_device_register(struct platform_device *pdev); static int omap_early_device_register(struct platform_device *pdev); +static struct omap_device_pm_latency omap_default_latency[] = { + { + .deactivate_func = omap_device_idle_hwmods, + .activate_func = omap_device_enable_hwmods, + .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, + } +}; + /* Private functions */Isn't this racey between devices if the latency values get adjusted automatically for each device?
A copy of this is made for each device (uses kmemdup later in the patch.) Kevin