summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-openmoko-2.6.32/0004-Add-JBT6k74-hook-for-use-by-KMS.patch
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2009-12-22 15:24:20 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2009-12-23 09:11:24 +0100
commitc3bfaaa2b9b5e6b9595758a4d2ed05940bf20722 (patch)
tree931209da9f27bbedb8f34c52af4af008c39d07bf /recipes/linux/linux-openmoko-2.6.32/0004-Add-JBT6k74-hook-for-use-by-KMS.patch
parent1a4c43bfb1031c97780528e2bfe83eefb1af114c (diff)
linux-openmoko-2.6.32: enable glamo DRM
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/linux/linux-openmoko-2.6.32/0004-Add-JBT6k74-hook-for-use-by-KMS.patch')
-rw-r--r--recipes/linux/linux-openmoko-2.6.32/0004-Add-JBT6k74-hook-for-use-by-KMS.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes/linux/linux-openmoko-2.6.32/0004-Add-JBT6k74-hook-for-use-by-KMS.patch b/recipes/linux/linux-openmoko-2.6.32/0004-Add-JBT6k74-hook-for-use-by-KMS.patch
new file mode 100644
index 0000000000..a223f5b7a9
--- /dev/null
+++ b/recipes/linux/linux-openmoko-2.6.32/0004-Add-JBT6k74-hook-for-use-by-KMS.patch
@@ -0,0 +1,49 @@
+From 6035b76b940c71e30824921271e8c3da8047f869 Mon Sep 17 00:00:00 2001
+From: Thomas White <taw@bitwiz.org.uk>
+Date: Sat, 21 Nov 2009 21:42:16 +0100
+Subject: [PATCH 4/4] Add JBT6k74 hook for use by KMS
+
+Signed-off-by: Thomas White <taw@bitwiz.org.uk>
+---
+ 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 b1aacb7..b9d02f2 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,
+--
+1.6.5.3
+