Hello. On 30-03-2011 19:19, jean.pihet@xxxxxxxxxxxxxx wrote:
From: Jean Pihet<j-pihet@xxxxxx>
Hwmod is queried from the omap device layer to manage the power domains wake-up latency constraints. Hwmod retrieves the correct power domain and if it exists it calls the corresponding power domain function.
Tested on OMAP3 Beagleboard in RET/OFF using wake-up latency constraints on MPU, CORE and PER.
Signed-off-by: Jean Pihet<j-pihet@xxxxxx>
[...]
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index e034294..62de888 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c
[...]
@@ -2322,11 +2323,34 @@ ohsps_unlock: return ret; } +/* + * omap_hwmod_set_wkup_constraint- set/release a wake-up latency constraint + * + * @oh: struct omap_hwmod* to which the target device belongs to. + * @cookie: identifier of the constraints list for @oh. + * @min_latency: the minimum allowed wake-up latency for @oh. + * + * Returns 0 upon success. + */ +int omap_hwmod_set_wkup_lat_constraint(struct omap_hwmod *oh, + void *cookie, long min_latency) +{ + struct powerdomain *pwrdm = omap_hwmod_get_pwrdm(oh); + + if (!PTR_ERR(pwrdm)) {
What's the point of calling PTR_ERR() at all, if just '!pwrdm' will give the same result?
WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html