From: Mathieu BĂ©rard Date: Sun, 13 Aug 2006 21:34:50 +0000 (+0000) Subject: Add forgotted LCD read hook for the Toshiba A105 X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=d6f33ac6a201caef3f95e2dcc6e173df9bb557ce;p=omnibook.git Add forgotted LCD read hook for the Toshiba A105 --- diff --git a/ec.h b/ec.h index e3f0387..1a4726d 100644 --- 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 ee71a3b..b205f9d 100644 --- 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",