Vladimir Serbinenko (phcoder@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4678
-gerrit
commit 6ecdcad3fef42be94b54b667468bc292c220246f Author: Vladimir Serbinenko phcoder@gmail.com Date: Sun Jan 12 15:19:50 2014 +0100
ec/lenovo/h8: Add backlight control.
Change-Id: I773793bf53d91ae787bd0d0ae7bd882243196d56 Signed-off-by: Vladimir Serbinenko phcoder@gmail.com --- src/ec/lenovo/h8/chip.h | 1 + src/ec/lenovo/h8/h8.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/ec/lenovo/h8/chip.h b/src/ec/lenovo/h8/chip.h index 3efff2f..37998ee 100644 --- a/src/ec/lenovo/h8/chip.h +++ b/src/ec/lenovo/h8/chip.h @@ -47,6 +47,7 @@ struct ec_lenovo_h8_config { u8 evente_enable; u8 eventf_enable;
+ u8 has_keyboard_backlight; u8 has_power_management_beeps; }; #endif diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index da5b478..8fffd5a 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -160,12 +160,19 @@ static void h8_enable(device_t dev) { struct ec_lenovo_h8_config *conf = dev->chip_info; u8 val, tmp; - u8 beepmask0, beepmask1; + u8 beepmask0, beepmask1, config1;
h8_log_ec_version();
ec_write(H8_CONFIG0, conf->config0); - ec_write(H8_CONFIG1, conf->config1); + config1 = conf->config1; + + if (conf->has_keyboard_backlight) { + if (get_option(&val, "backlight") != CB_SUCCESS) + val = 0; /* Both backlights. */ + config1 = (config1 & 0xf3) | ((val & 0x3) << 2); + } + ec_write(H8_CONFIG1, config1); ec_write(H8_CONFIG2, conf->config2); ec_write(H8_CONFIG3, conf->config3);