diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 16:09:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 16:09:47 -0400 |
commit | 84860bf0644d7c45afe7ddbd30731c3e3c371fae (patch) | |
tree | d6c4b98a9c3fd9981e7fcc5d7729c9e01e327767 /drivers/video | |
parent | 8caf89157d64f1eedba37113afb4b303b2b3e301 (diff) | |
parent | 6fbfddcb52d8d9fa2cd209f5ac2a1c87497d55b5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/corgi_bl.c | 10 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 2 | ||||
-rw-r--r-- | drivers/video/imxfb.c | 10 | ||||
-rw-r--r-- | drivers/video/pxafb.c | 10 | ||||
-rw-r--r-- | drivers/video/s1d13xxxfb.c | 7 | ||||
-rw-r--r-- | drivers/video/s3c2410fb.c | 27 | ||||
-rw-r--r-- | drivers/video/sa1100fb.c | 10 | ||||
-rw-r--r-- | drivers/video/w100fb.c | 46 |
8 files changed, 52 insertions, 70 deletions
diff --git a/drivers/video/backlight/corgi_bl.c b/drivers/video/backlight/corgi_bl.c index 3c72c627e65e..1991fdb32dfb 100644 --- a/drivers/video/backlight/corgi_bl.c +++ b/drivers/video/backlight/corgi_bl.c | |||
@@ -73,17 +73,15 @@ static void corgibl_blank(int blank) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | #ifdef CONFIG_PM | 75 | #ifdef CONFIG_PM |
76 | static int corgibl_suspend(struct device *dev, pm_message_t state, u32 level) | 76 | static int corgibl_suspend(struct device *dev, pm_message_t state) |
77 | { | 77 | { |
78 | if (level == SUSPEND_POWER_DOWN) | 78 | corgibl_blank(FB_BLANK_POWERDOWN); |
79 | corgibl_blank(FB_BLANK_POWERDOWN); | ||
80 | return 0; | 79 | return 0; |
81 | } | 80 | } |
82 | 81 | ||
83 | static int corgibl_resume(struct device *dev, u32 level) | 82 | static int corgibl_resume(struct device *dev) |
84 | { | 83 | { |
85 | if (level == RESUME_POWER_ON) | 84 | corgibl_blank(FB_BLANK_UNBLANK); |
86 | corgibl_blank(FB_BLANK_UNBLANK); | ||
87 | return 0; | 85 | return 0; |
88 | } | 86 | } |
89 | #else | 87 | #else |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 70be7009f8af..9073be4221a8 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1031,7 +1031,7 @@ register_framebuffer(struct fb_info *fb_info) | |||
1031 | break; | 1031 | break; |
1032 | fb_info->node = i; | 1032 | fb_info->node = i; |
1033 | 1033 | ||
1034 | fb_info->class_device = class_device_create(fb_class, MKDEV(FB_MAJOR, i), | 1034 | fb_info->class_device = class_device_create(fb_class, NULL, MKDEV(FB_MAJOR, i), |
1035 | fb_info->device, "fb%d", i); | 1035 | fb_info->device, "fb%d", i); |
1036 | if (IS_ERR(fb_info->class_device)) { | 1036 | if (IS_ERR(fb_info->class_device)) { |
1037 | /* Not fatal */ | 1037 | /* Not fatal */ |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 1d54d3d6960b..0b9301facbd3 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -424,23 +424,21 @@ static void imxfb_setup_gpio(struct imxfb_info *fbi) | |||
424 | * Power management hooks. Note that we won't be called from IRQ context, | 424 | * Power management hooks. Note that we won't be called from IRQ context, |
425 | * unlike the blank functions above, so we may sleep. | 425 | * unlike the blank functions above, so we may sleep. |
426 | */ | 426 | */ |
427 | static int imxfb_suspend(struct device *dev, pm_message_t state, u32 level) | 427 | static int imxfb_suspend(struct device *dev, pm_message_t state) |
428 | { | 428 | { |
429 | struct imxfb_info *fbi = dev_get_drvdata(dev); | 429 | struct imxfb_info *fbi = dev_get_drvdata(dev); |
430 | pr_debug("%s\n",__FUNCTION__); | 430 | pr_debug("%s\n",__FUNCTION__); |
431 | 431 | ||
432 | if (level == SUSPEND_DISABLE || level == SUSPEND_POWER_DOWN) | 432 | imxfb_disable_controller(fbi); |
433 | imxfb_disable_controller(fbi); | ||
434 | return 0; | 433 | return 0; |
435 | } | 434 | } |
436 | 435 | ||
437 | static int imxfb_resume(struct device *dev, u32 level) | 436 | static int imxfb_resume(struct device *dev) |
438 | { | 437 | { |
439 | struct imxfb_info *fbi = dev_get_drvdata(dev); | 438 | struct imxfb_info *fbi = dev_get_drvdata(dev); |
440 | pr_debug("%s\n",__FUNCTION__); | 439 | pr_debug("%s\n",__FUNCTION__); |
441 | 440 | ||
442 | if (level == RESUME_ENABLE) | 441 | imxfb_enable_controller(fbi); |
443 | imxfb_enable_controller(fbi); | ||
444 | return 0; | 442 | return 0; |
445 | } | 443 | } |
446 | #else | 444 | #else |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 194eed0a238c..6206da9dd5da 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -981,21 +981,19 @@ pxafb_freq_policy(struct notifier_block *nb, unsigned long val, void *data) | |||
981 | * Power management hooks. Note that we won't be called from IRQ context, | 981 | * Power management hooks. Note that we won't be called from IRQ context, |
982 | * unlike the blank functions above, so we may sleep. | 982 | * unlike the blank functions above, so we may sleep. |
983 | */ | 983 | */ |
984 | static int pxafb_suspend(struct device *dev, pm_message_t state, u32 level) | 984 | static int pxafb_suspend(struct device *dev, pm_message_t state) |
985 | { | 985 | { |
986 | struct pxafb_info *fbi = dev_get_drvdata(dev); | 986 | struct pxafb_info *fbi = dev_get_drvdata(dev); |
987 | 987 | ||
988 | if (level == SUSPEND_DISABLE || level == SUSPEND_POWER_DOWN) | 988 | set_ctrlr_state(fbi, C_DISABLE_PM); |
989 | set_ctrlr_state(fbi, C_DISABLE_PM); | ||
990 | return 0; | 989 | return 0; |
991 | } | 990 | } |
992 | 991 | ||
993 | static int pxafb_resume(struct device *dev, u32 level) | 992 | static int pxafb_resume(struct device *dev) |
994 | { | 993 | { |
995 | struct pxafb_info *fbi = dev_get_drvdata(dev); | 994 | struct pxafb_info *fbi = dev_get_drvdata(dev); |
996 | 995 | ||
997 | if (level == RESUME_ENABLE) | 996 | set_ctrlr_state(fbi, C_ENABLE_PM); |
998 | set_ctrlr_state(fbi, C_ENABLE_PM); | ||
999 | return 0; | 997 | return 0; |
1000 | } | 998 | } |
1001 | #else | 999 | #else |
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c index fa98d91c42eb..cb2f7a1de947 100644 --- a/drivers/video/s1d13xxxfb.c +++ b/drivers/video/s1d13xxxfb.c | |||
@@ -655,7 +655,7 @@ bail: | |||
655 | } | 655 | } |
656 | 656 | ||
657 | #ifdef CONFIG_PM | 657 | #ifdef CONFIG_PM |
658 | static int s1d13xxxfb_suspend(struct device *dev, pm_message_t state, u32 level) | 658 | static int s1d13xxxfb_suspend(struct device *dev, pm_message_t state) |
659 | { | 659 | { |
660 | struct fb_info *info = dev_get_drvdata(dev); | 660 | struct fb_info *info = dev_get_drvdata(dev); |
661 | struct s1d13xxxfb_par *s1dfb = info->par; | 661 | struct s1d13xxxfb_par *s1dfb = info->par; |
@@ -702,15 +702,12 @@ static int s1d13xxxfb_suspend(struct device *dev, pm_message_t state, u32 level) | |||
702 | return 0; | 702 | return 0; |
703 | } | 703 | } |
704 | 704 | ||
705 | static int s1d13xxxfb_resume(struct device *dev, u32 level) | 705 | static int s1d13xxxfb_resume(struct device *dev) |
706 | { | 706 | { |
707 | struct fb_info *info = dev_get_drvdata(dev); | 707 | struct fb_info *info = dev_get_drvdata(dev); |
708 | struct s1d13xxxfb_par *s1dfb = info->par; | 708 | struct s1d13xxxfb_par *s1dfb = info->par; |
709 | struct s1d13xxxfb_pdata *pdata = NULL; | 709 | struct s1d13xxxfb_pdata *pdata = NULL; |
710 | 710 | ||
711 | if (level != RESUME_ENABLE) | ||
712 | return 0; | ||
713 | |||
714 | /* awaken the chip */ | 711 | /* awaken the chip */ |
715 | s1d13xxxfb_writereg(s1dfb, S1DREG_PS_CNF, 0x10); | 712 | s1d13xxxfb_writereg(s1dfb, S1DREG_PS_CNF, 0x10); |
716 | 713 | ||
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 5ab79afb53b7..3862d3cb1fb2 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -847,37 +847,32 @@ static int s3c2410fb_remove(struct device *dev) | |||
847 | 847 | ||
848 | /* suspend and resume support for the lcd controller */ | 848 | /* suspend and resume support for the lcd controller */ |
849 | 849 | ||
850 | static int s3c2410fb_suspend(struct device *dev, pm_message_t state, u32 level) | 850 | static int s3c2410fb_suspend(struct device *dev, pm_message_t state) |
851 | { | 851 | { |
852 | struct fb_info *fbinfo = dev_get_drvdata(dev); | 852 | struct fb_info *fbinfo = dev_get_drvdata(dev); |
853 | struct s3c2410fb_info *info = fbinfo->par; | 853 | struct s3c2410fb_info *info = fbinfo->par; |
854 | 854 | ||
855 | if (level == SUSPEND_DISABLE || level == SUSPEND_POWER_DOWN) { | 855 | s3c2410fb_stop_lcd(); |
856 | s3c2410fb_stop_lcd(); | ||
857 | 856 | ||
858 | /* sleep before disabling the clock, we need to ensure | 857 | /* sleep before disabling the clock, we need to ensure |
859 | * the LCD DMA engine is not going to get back on the bus | 858 | * the LCD DMA engine is not going to get back on the bus |
860 | * before the clock goes off again (bjd) */ | 859 | * before the clock goes off again (bjd) */ |
861 | 860 | ||
862 | msleep(1); | 861 | msleep(1); |
863 | clk_disable(info->clk); | 862 | clk_disable(info->clk); |
864 | } | ||
865 | 863 | ||
866 | return 0; | 864 | return 0; |
867 | } | 865 | } |
868 | 866 | ||
869 | static int s3c2410fb_resume(struct device *dev, u32 level) | 867 | static int s3c2410fb_resume(struct device *dev) |
870 | { | 868 | { |
871 | struct fb_info *fbinfo = dev_get_drvdata(dev); | 869 | struct fb_info *fbinfo = dev_get_drvdata(dev); |
872 | struct s3c2410fb_info *info = fbinfo->par; | 870 | struct s3c2410fb_info *info = fbinfo->par; |
873 | 871 | ||
874 | if (level == RESUME_ENABLE) { | 872 | clk_enable(info->clk); |
875 | clk_enable(info->clk); | 873 | msleep(1); |
876 | msleep(1); | ||
877 | |||
878 | s3c2410fb_init_registers(info); | ||
879 | 874 | ||
880 | } | 875 | s3c2410fb_init_registers(info); |
881 | 876 | ||
882 | return 0; | 877 | return 0; |
883 | } | 878 | } |
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index 8000890e4271..78e5f194b0df 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -1309,21 +1309,19 @@ sa1100fb_freq_policy(struct notifier_block *nb, unsigned long val, | |||
1309 | * Power management hooks. Note that we won't be called from IRQ context, | 1309 | * Power management hooks. Note that we won't be called from IRQ context, |
1310 | * unlike the blank functions above, so we may sleep. | 1310 | * unlike the blank functions above, so we may sleep. |
1311 | */ | 1311 | */ |
1312 | static int sa1100fb_suspend(struct device *dev, pm_message_t state, u32 level) | 1312 | static int sa1100fb_suspend(struct device *dev, pm_message_t state) |
1313 | { | 1313 | { |
1314 | struct sa1100fb_info *fbi = dev_get_drvdata(dev); | 1314 | struct sa1100fb_info *fbi = dev_get_drvdata(dev); |
1315 | 1315 | ||
1316 | if (level == SUSPEND_DISABLE || level == SUSPEND_POWER_DOWN) | 1316 | set_ctrlr_state(fbi, C_DISABLE_PM); |
1317 | set_ctrlr_state(fbi, C_DISABLE_PM); | ||
1318 | return 0; | 1317 | return 0; |
1319 | } | 1318 | } |
1320 | 1319 | ||
1321 | static int sa1100fb_resume(struct device *dev, u32 level) | 1320 | static int sa1100fb_resume(struct device *dev) |
1322 | { | 1321 | { |
1323 | struct sa1100fb_info *fbi = dev_get_drvdata(dev); | 1322 | struct sa1100fb_info *fbi = dev_get_drvdata(dev); |
1324 | 1323 | ||
1325 | if (level == RESUME_ENABLE) | 1324 | set_ctrlr_state(fbi, C_ENABLE_PM); |
1326 | set_ctrlr_state(fbi, C_ENABLE_PM); | ||
1327 | return 0; | 1325 | return 0; |
1328 | } | 1326 | } |
1329 | #else | 1327 | #else |
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c index 0030c071da8f..752bf88906a9 100644 --- a/drivers/video/w100fb.c +++ b/drivers/video/w100fb.c | |||
@@ -438,36 +438,34 @@ static void w100fb_restore_vidmem(struct w100fb_par *par) | |||
438 | } | 438 | } |
439 | } | 439 | } |
440 | 440 | ||
441 | static int w100fb_suspend(struct device *dev, pm_message_t state, uint32_t level) | 441 | static int w100fb_suspend(struct device *dev, pm_message_t state) |
442 | { | 442 | { |
443 | if (level == SUSPEND_POWER_DOWN) { | 443 | struct fb_info *info = dev_get_drvdata(dev); |
444 | struct fb_info *info = dev_get_drvdata(dev); | 444 | struct w100fb_par *par=info->par; |
445 | struct w100fb_par *par=info->par; | 445 | struct w100_tg_info *tg = par->mach->tg; |
446 | struct w100_tg_info *tg = par->mach->tg; | 446 | |
447 | 447 | w100fb_save_vidmem(par); | |
448 | w100fb_save_vidmem(par); | 448 | if(tg && tg->suspend) |
449 | if(tg && tg->suspend) | 449 | tg->suspend(par); |
450 | tg->suspend(par); | 450 | w100_suspend(W100_SUSPEND_ALL); |
451 | w100_suspend(W100_SUSPEND_ALL); | 451 | par->blanked = 1; |
452 | par->blanked = 1; | 452 | |
453 | } | ||
454 | return 0; | 453 | return 0; |
455 | } | 454 | } |
456 | 455 | ||
457 | static int w100fb_resume(struct device *dev, uint32_t level) | 456 | static int w100fb_resume(struct device *dev) |
458 | { | 457 | { |
459 | if (level == RESUME_POWER_ON) { | 458 | struct fb_info *info = dev_get_drvdata(dev); |
460 | struct fb_info *info = dev_get_drvdata(dev); | 459 | struct w100fb_par *par=info->par; |
461 | struct w100fb_par *par=info->par; | 460 | struct w100_tg_info *tg = par->mach->tg; |
462 | struct w100_tg_info *tg = par->mach->tg; | 461 | |
462 | w100_hw_init(par); | ||
463 | w100fb_activate_var(par); | ||
464 | w100fb_restore_vidmem(par); | ||
465 | if(tg && tg->resume) | ||
466 | tg->resume(par); | ||
467 | par->blanked = 0; | ||
463 | 468 | ||
464 | w100_hw_init(par); | ||
465 | w100fb_activate_var(par); | ||
466 | w100fb_restore_vidmem(par); | ||
467 | if(tg && tg->resume) | ||
468 | tg->resume(par); | ||
469 | par->blanked = 0; | ||
470 | } | ||
471 | return 0; | 469 | return 0; |
472 | } | 470 | } |
473 | #else | 471 | #else |