]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
Add forgotted LCD read hook for the Toshiba A105
authorMathieu Bérard <mathieu.berard@crans.org>
Sun, 13 Aug 2006 21:34:50 +0000 (21:34 +0000)
committerMathieu Bérard <mathieu.berard@crans.org>
Sun, 13 Aug 2006 21:34:50 +0000 (21:34 +0000)
ec.h
lcd.c

diff --git a/ec.h b/ec.h
index e3f03872dd87539a6834103d9c826e1f99c24a74..1a4726d1de92cb04987238c88118f3ab51c9bbce 100644 (file)
--- a/ec.h
+++ b/ec.h
@@ -157,10 +157,11 @@ extern int omnibook_mem_write(u32 addr, u8 data);
 #define XE3GC_MUTE_SCAN                                0x20    /* Volume up button scancode */
 
 /*
- * Toshiba Satellite A105 values
+ * Toshiba Satellite A105 values and mask
  */
 
 #define A105_BNDT                              0xA3    /* LCD brightness */
+#define A105_BNDT_MASK                         0x0F
 
 /*
  * Fujitsu Amilo D values
diff --git a/lcd.c b/lcd.c
index ee71a3bf8d9eaa94bf0fb95ffd56da3370bd88e2..b205f9d6bc219b1315d2f513150090dc408fce30 100644 (file)
--- a/lcd.c
+++ b/lcd.c
@@ -77,6 +77,13 @@ static int omnibook_get_lcd_brightness(void)
                if ((retval = omnibook_ec_read(AMILOD_CBRG, &brgt)))
                        return retval;
                retval = brgt &= AMILOD_CBRG_MASK;
+       /*
+         * TSA105
+         */
+        } else if (omnibook_ectype & (TSA105) ) {
+                if ((retval = omnibook_ec_read(A105_BNDT, &brgt)))
+                        return retval;
+               retval = brgt &= A105_BNDT_MASK;
        } else {
                printk(KERN_INFO
                       "%s: LCD brightness handling is unsupported on this machine.\n",