2009-03-06 21:25:25 +00:00
|
|
|
--- a/drivers/video/display/jbt6k74.c
|
|
|
|
+++ b/drivers/video/display/jbt6k74.c
|
2009-05-04 11:35:08 +00:00
|
|
|
@@ -443,8 +443,17 @@ int jbt6k74_enter_state(struct jbt_info
|
2009-03-06 21:25:25 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (rc == 0)
|
|
|
|
+ if (rc == 0) {
|
|
|
|
+ switch (new_state) {
|
|
|
|
+ case JBT_STATE_NORMAL:
|
|
|
|
+ case JBT_STATE_QVGA_NORMAL:
|
|
|
|
+ jbt->last_state = new_state;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
jbt->state = new_state;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
2009-05-04 11:35:08 +00:00
|
|
|
@@ -595,7 +604,14 @@ static int fb_notifier_callback(struct n
|
2009-03-06 21:25:25 +00:00
|
|
|
switch (fb_blank) {
|
|
|
|
case FB_BLANK_UNBLANK:
|
|
|
|
dev_info(&jbt->spi_dev->dev, "**** jbt6k74 unblank\n");
|
|
|
|
- jbt6k74_enter_state(jbt, JBT_STATE_NORMAL);
|
|
|
|
+ switch (jbt->last_state) {
|
|
|
|
+ case JBT_STATE_QVGA_NORMAL:
|
|
|
|
+ jbt6k74_enter_state(jbt, JBT_STATE_QVGA_NORMAL);
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ jbt6k74_enter_state(jbt, JBT_STATE_NORMAL);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
break;
|
|
|
|
case FB_BLANK_NORMAL:
|
|
|
|
dev_info(&jbt->spi_dev->dev, "**** jbt6k74 normal\n");
|
2009-05-04 11:35:08 +00:00
|
|
|
@@ -720,8 +736,6 @@ static int jbt_suspend(struct spi_device
|
2009-03-06 21:25:25 +00:00
|
|
|
{
|
|
|
|
struct jbt_info *jbt = dev_get_drvdata(&spi->dev);
|
|
|
|
|
|
|
|
- /* Save mode for resume */
|
|
|
|
- jbt->last_state = jbt->state;
|
|
|
|
/* FIXME: deep standby causes WSOD on certain devices. We use
|
|
|
|
* sleep as workaround */
|
|
|
|
jbt6k74_enter_state(jbt, JBT_STATE_SLEEP);
|