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

« back to all changes in this revision

Viewing changes to arch/arm/mach-pxa/cm-x2xx.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:
10
10
 */
11
11
 
12
12
#include <linux/platform_device.h>
13
 
#include <linux/sysdev.h>
 
13
#include <linux/syscore_ops.h>
14
14
#include <linux/irq.h>
15
15
#include <linux/gpio.h>
16
16
 
379
379
 
380
380
static void __init cmx2xx_init_display(void)
381
381
{
382
 
        set_pxa_fb_info(cmx2xx_display);
 
382
        pxa_set_fb_info(NULL, cmx2xx_display);
383
383
}
384
384
#else
385
385
static inline void cmx2xx_init_display(void) {}
388
388
#ifdef CONFIG_PM
389
389
static unsigned long sleep_save_msc[10];
390
390
 
391
 
static int cmx2xx_suspend(struct sys_device *dev, pm_message_t state)
 
391
static int cmx2xx_suspend(void)
392
392
{
393
393
        cmx2xx_pci_suspend();
394
394
 
412
412
        return 0;
413
413
}
414
414
 
415
 
static int cmx2xx_resume(struct sys_device *dev)
 
415
static void cmx2xx_resume(void)
416
416
{
417
417
        cmx2xx_pci_resume();
418
418
 
420
420
        __raw_writel(sleep_save_msc[0], MSC0);
421
421
        __raw_writel(sleep_save_msc[1], MSC1);
422
422
        __raw_writel(sleep_save_msc[2], MSC2);
423
 
 
424
 
        return 0;
425
423
}
426
424
 
427
 
static struct sysdev_class cmx2xx_pm_sysclass = {
428
 
        .name = "pm",
 
425
static struct syscore_ops cmx2xx_pm_syscore_ops = {
429
426
        .resume = cmx2xx_resume,
430
427
        .suspend = cmx2xx_suspend,
431
428
};
432
429
 
433
 
static struct sys_device cmx2xx_pm_device = {
434
 
        .cls = &cmx2xx_pm_sysclass,
435
 
};
436
 
 
437
430
static int __init cmx2xx_pm_init(void)
438
431
{
439
 
        int error;
440
 
        error = sysdev_class_register(&cmx2xx_pm_sysclass);
441
 
        if (error == 0)
442
 
                error = sysdev_register(&cmx2xx_pm_device);
443
 
        return error;
 
432
        register_syscore_ops(&cmx2xx_pm_syscore_ops);
 
433
 
 
434
        return 0;
444
435
}
445
436
#else
446
437
static int __init cmx2xx_pm_init(void) { return 0; }