aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-11-21 21:42:16 +0100
committerThomas White <taw@bitwiz.org.uk>2010-02-09 23:37:32 +0100
commit4fb4da82e89091252461d979cff8e1288719a71f (patch)
tree1ed5e3c4f7c75cb60f3c5f26c6e5f4b59ab26595
parent2e3748841bd202b072b02919e56450b7b85de4af (diff)
Add JBT6k74 hook for use by KMS
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
-rw-r--r--drivers/video/backlight/jbt6k74.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/video/backlight/jbt6k74.c b/drivers/video/backlight/jbt6k74.c
index 8450904d585..95ca4cfae96 100644
--- a/drivers/video/backlight/jbt6k74.c
+++ b/drivers/video/backlight/jbt6k74.c
@@ -698,6 +698,22 @@ static int jbt6k74_get_power(struct lcd_device *ld)
}
}
+/* This is utterly, totally horrible. I'm REALLY sorry... */
+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_power_mode(jbt_global, JBT_POWER_MODE_SLEEP);
+ } else {
+ jbt6k74_enter_power_mode(jbt_global, JBT_POWER_MODE_NORMAL);
+ }
+}
+EXPORT_SYMBOL_GPL(jbt6k74_action);
+
struct lcd_ops jbt6k74_lcd_ops = {
.set_power = jbt6k74_set_power,
.get_power = jbt6k74_get_power,
@@ -728,6 +744,8 @@ static int __devinit jbt_probe(struct spi_device *spi)
if (!jbt)
return -ENOMEM;
+ jbt_global = jbt;
+
jbt->spi = spi;
jbt->lcd_dev = lcd_device_register("jbt6k74-lcd", &spi->dev, jbt,