diff options
author | Thomas White <taw@bitwiz.org.uk> | 2009-11-21 21:42:16 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2009-11-22 18:54:00 +0100 |
commit | a4daba3d3744a7801bf0de1602a8341798331a2a (patch) | |
tree | 14e93d0dbd89899047de48c59d37ccbe2b0e6565 /drivers/video/backlight | |
parent | 6bdf584dcf4fe8e6ef1296e43d3479b3b6951a29 (diff) |
Add JBT6k74 hook for use by KMSgdrm-2.6.31
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/jbt6k74.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/video/backlight/jbt6k74.c b/drivers/video/backlight/jbt6k74.c index b1aacb7ebcd..b9d02f2ca95 100644 --- a/drivers/video/backlight/jbt6k74.c +++ b/drivers/video/backlight/jbt6k74.c @@ -688,6 +688,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, @@ -718,6 +734,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, |