~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-s3c2416/pm.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
*/
12
12
 
13
13
#include <linux/sysdev.h>
 
14
#include <linux/syscore_ops.h>
14
15
#include <linux/io.h>
15
16
 
16
17
#include <asm/cacheflush.h>
55
56
        return 0;
56
57
}
57
58
 
58
 
static int s3c2416_pm_suspend(struct sys_device *dev, pm_message_t state)
 
59
static struct sysdev_driver s3c2416_pm_driver = {
 
60
        .add            = s3c2416_pm_add,
 
61
};
 
62
 
 
63
static __init int s3c2416_pm_init(void)
59
64
{
60
 
        return 0;
 
65
        return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_pm_driver);
61
66
}
62
67
 
63
 
static int s3c2416_pm_resume(struct sys_device *dev)
 
68
arch_initcall(s3c2416_pm_init);
 
69
 
 
70
 
 
71
static void s3c2416_pm_resume(void)
64
72
{
65
73
        /* unset the return-from-sleep amd inform flags */
66
74
        __raw_writel(0x0, S3C2443_PWRMODE);
67
75
        __raw_writel(0x0, S3C2412_INFORM0);
68
76
        __raw_writel(0x0, S3C2412_INFORM1);
69
 
 
70
 
        return 0;
71
77
}
72
78
 
73
 
static struct sysdev_driver s3c2416_pm_driver = {
74
 
        .add            = s3c2416_pm_add,
75
 
        .suspend        = s3c2416_pm_suspend,
 
79
struct syscore_ops s3c2416_pm_syscore_ops = {
76
80
        .resume         = s3c2416_pm_resume,
77
81
};
78
 
 
79
 
static __init int s3c2416_pm_init(void)
80
 
{
81
 
        return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_pm_driver);
82
 
}
83
 
 
84
 
arch_initcall(s3c2416_pm_init);