summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMayuresh Kulkarni <mkulkarni@nvidia.com>2010-02-16 14:58:08 +0530
committerMayuresh Kulkarni <mkulkarni@nvidia.com>2010-02-16 14:58:08 +0530
commita0efa75637073831e25a2e9148f53a23f5d0adf6 (patch)
tree4c6528847720f0a77e1611899f6de23d5995d4fd /arch
parent3a67ec3d32ec9217c3e6bdb1b60efdd25911f6f2 (diff)
tegra nvrm: Implement suspend/resume calls for nvrm_user.
This change simply calls the appropriate suspend/resume APIs of nvrm_kernel respectively. Return -1 in case of error. This change is must when we enable system power management. Change-Id: I698f7d7d3daf9eeb63872ddf2f8a216d3f3e9166
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/nvrm_user.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/nvrm_user.c b/arch/arm/mach-tegra/nvrm_user.c
index 04bbae45068c..f97322992faa 100644
--- a/arch/arm/mach-tegra/nvrm_user.c
+++ b/arch/arm/mach-tegra/nvrm_user.c
@@ -647,25 +647,30 @@ static int nvrm_remove(struct platform_device *pdev)
static int nvrm_suspend(struct platform_device *pdev)
{
- NvError Err = NvSuccess;
- printk(KERN_INFO "%s called\n", __func__);
- return Err;
+ if(NvRmKernelPowerSuspend(s_hRmGlobal)) {
+ printk(KERN_INFO "%s : FAILED\n", __func__);
+ return -1;
+ }
+ return 0;
}
static int nvrm_resume(struct platform_device *pdev)
{
- NvError Err = NvSuccess;
- printk(KERN_INFO "%s called\n", __func__);
- return Err;
+ if(NvRmKernelPowerResume(s_hRmGlobal)) {
+ printk(KERN_INFO "%s : FAILED\n", __func__);
+ return -1;
+ }
+ return 0;
+
}
static struct platform_driver nvrm_driver =
{
- .probe = nvrm_probe,
- .remove = nvrm_remove,
- .suspend = nvrm_suspend,
- .resume = nvrm_resume,
- .driver = { .name = "nvrm" }
+ .probe = nvrm_probe,
+ .remove = nvrm_remove,
+ .suspend = nvrm_suspend,
+ .resume = nvrm_resume,
+ .driver = { .name = "nvrm" }
};
static int __init nvrm_init(void)