aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/display/jbt6k74.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/display/jbt6k74.c')
-rw-r--r--drivers/video/display/jbt6k74.c17
1 files changed, 17 insertions, 0 deletions
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;