From f7d411ee185c7b992e9f95b512489892e8f7c30d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 1 Jul 2009 19:17:21 +0100 Subject: Nasty jbt stuff This adds a stopgap measure to permit manipulation of the LCD controller chip in the absence of an fb notifier chain. It also adds some messing around with the DPMS stuff. Signed-off-by: Thomas White --- drivers/video/display/jbt6k74.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'drivers/video') 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; -- cgit v1.2.3