diff options
-rw-r--r-- | drivers/mfd/glamo/glamo-display.c | 22 | ||||
-rw-r--r-- | drivers/video/display/jbt6k74.c | 17 |
2 files changed, 27 insertions, 12 deletions
diff --git a/drivers/mfd/glamo/glamo-display.c b/drivers/mfd/glamo/glamo-display.c index 1fd2b7de97c..8842c3ed267 100644 --- a/drivers/mfd/glamo/glamo-display.c +++ b/drivers/mfd/glamo/glamo-display.c @@ -256,6 +256,9 @@ static void notify_blank(struct drm_crtc *crtc, int mode) #endif +extern void jbt6k74_action(int val); + + /* Power on/off */ static void glamo_crtc_dpms(struct drm_crtc *crtc, int mode) { @@ -267,31 +270,26 @@ static void glamo_crtc_dpms(struct drm_crtc *crtc, int mode) switch (mode) { case DRM_MODE_DPMS_OFF: - /* Simulating FB_BLANK_NORMAL allow turning off backlight */ - //if (gfb->blank_mode != FB_BLANK_NORMAL) - // notify_blank(info, FB_BLANK_NORMAL); - /* LCM need notification before pixel clock is stopped */ - //notify_blank(crtc, blank_mode); + //jbt6k74_action(0); /* disable the pixel clock */ - glamo_engine_clkreg_set(gdrm->glamo_core, GLAMO_ENGINE_LCD, - GLAMO_CLOCK_LCD_EN_DCLK, 0); +// glamo_engine_clkreg_set(gdrm->glamo_core, GLAMO_ENGINE_LCD, +// GLAMO_CLOCK_LCD_EN_DCLK, 0); glamo_crtc->blank_mode = mode; break; case DRM_MODE_DPMS_ON: /* enable the pixel clock if off */ if (glamo_crtc->blank_mode == DRM_MODE_DPMS_OFF) glamo_engine_clkreg_set(gdrm->glamo_core, - GLAMO_ENGINE_LCD, - GLAMO_CLOCK_LCD_EN_DCLK, - GLAMO_CLOCK_LCD_EN_DCLK); + GLAMO_ENGINE_LCD, + GLAMO_CLOCK_LCD_EN_DCLK, + GLAMO_CLOCK_LCD_EN_DCLK); - //notify_blank(info, blank_mode); + //jbt6k74_action(1); glamo_crtc->blank_mode = mode; break; } - } diff --git a/drivers/video/display/jbt6k74.c b/drivers/video/display/jbt6k74.c index 5d7a6519de9..fba69b52f17 100644 --- a/drivers/video/display/jbt6k74.c +++ b/drivers/video/display/jbt6k74.c @@ -622,6 +622,21 @@ static int fb_notifier_callback(struct notifier_block *self, return 0; } +struct jbt_info *jbt_global; +void jbt6k74_action(int val) +{ + if ( !jbt_global ) { + printk(KERN_CRIT "JBT not initialised!!!\n"); + return; + } + if ( val == 0 ) { + jbt6k74_enter_state(jbt_global, JBT_STATE_SLEEP); + } else { + jbt6k74_enter_state(jbt_global, jbt_global->normal_state); + } +} +EXPORT_SYMBOL_GPL(jbt6k74_action); + /* linux device model infrastructure */ static int __devinit jbt_probe(struct spi_device *spi) @@ -646,6 +661,8 @@ static int __devinit jbt_probe(struct spi_device *spi) if (!jbt) return -ENOMEM; + jbt_global = jbt; + jbt->spi_dev = spi; jbt->normal_state = JBT_STATE_NORMAL; jbt->state = JBT_STATE_DEEP_STANDBY; |