aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/glamo
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/glamo')
-rw-r--r--drivers/mfd/glamo/glamo-core.c16
-rw-r--r--drivers/mfd/glamo/glamo-core.h3
2 files changed, 18 insertions, 1 deletions
diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c
index a6b977b41f6..445ff242d5b 100644
--- a/drivers/mfd/glamo/glamo-core.c
+++ b/drivers/mfd/glamo/glamo-core.c
@@ -1088,6 +1088,8 @@ static int __init glamo_probe(struct platform_device *pdev)
goto out_free;
}
+ init_resume_dependency_list(&glamo->resume_dependency);
+
/* register a number of sibling devices whoise IOMEM resources
* are siblings of pdev's IOMEM resource */
#if 0
@@ -1226,6 +1228,18 @@ static int glamo_remove(struct platform_device *pdev)
}
#ifdef CONFIG_PM
+
+/* have to export this because struct glamo_core is opaque */
+
+void glamo_register_resume_dependency(struct resume_dependency *
+ resume_dependency)
+{
+ register_resume_dependency(&glamo_handle->resume_dependency,
+ resume_dependency);
+}
+EXPORT_SYMBOL_GPL(glamo_register_resume_dependency);
+
+
static int glamo_suspend(struct platform_device *pdev, pm_message_t state)
{
glamo_power(glamo_handle, GLAMO_POWER_SUSPEND);
@@ -1235,6 +1249,8 @@ static int glamo_suspend(struct platform_device *pdev, pm_message_t state)
static int glamo_resume(struct platform_device *pdev)
{
glamo_power(glamo_handle, GLAMO_POWER_ON);
+ callback_all_resume_dependencies(&glamo_handle->resume_dependency);
+
return 0;
}
#else
diff --git a/drivers/mfd/glamo/glamo-core.h b/drivers/mfd/glamo/glamo-core.h
index cf89f032500..1fee05997d6 100644
--- a/drivers/mfd/glamo/glamo-core.h
+++ b/drivers/mfd/glamo/glamo-core.h
@@ -2,7 +2,7 @@
#define __GLAMO_CORE_H
#include <asm/system.h>
-
+#include <linux/resume-dependency.h>
/* for the time being, we put the on-screen framebuffer into the lowest
* VRAM space. This should make the code easily compatible with the various
@@ -29,6 +29,7 @@ struct glamo_core {
u_int16_t type;
u_int16_t revision;
spinlock_t lock;
+ struct resume_dependency resume_dependency;
};
struct glamo_script {