From add3f7fda27eb93636b473471d17f985f14cbb8d Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sat, 11 Jan 2014 20:58:20 +0100 Subject: ec/lenovo/h8: Allow control of low-battery beep. Change-Id: I2f422e83f2afcf0cc3f3ecbace01a8f4f39e87d4 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/4663 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/ec/lenovo/h8/h8.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ec') diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index 9c85da79db..0c80d49d82 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -178,6 +178,16 @@ static void h8_enable(device_t dev) beepmask0 = 0x00; beepmask1 = 0x00; } + + if (conf->has_power_management_beeps) { + if (get_option(&val, "low_battery_beep") != CB_SUCCESS) + val = 1; + if (val) + beepmask0 |= 2; + else + beepmask0 &= ~2; + } + ec_write(H8_SOUND_ENABLE0, beepmask0); ec_write(H8_SOUND_ENABLE1, beepmask1); -- cgit v1.2.3