ec/lenovo/h8: Allow control of low-battery beep.

Change-Id: I2f422e83f2afcf0cc3f3ecbace01a8f4f39e87d4
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4663
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Vladimir Serbinenko 2014-01-11 20:58:20 +01:00
parent 9a3b9c42d3
commit add3f7fda2
6 changed files with 15 additions and 0 deletions

View File

@ -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);

View File

@ -115,6 +115,7 @@ entries
1074 1 e 1 fn_ctrl_swap
1075 1 e 1 sticky_fn
1076 1 e 1 power_management_beeps
1077 1 e 1 low_battery_beep
# -----------------------------------------------------------------
enumerations

View File

@ -12,4 +12,5 @@ touchpad=Enable
fn_ctrl_swap=Disable
sticky_fn=Disable
power_management_beeps=Enable
low_battery_beep=Enable
sata_mode=AHCI

View File

@ -93,6 +93,7 @@ entries
417 1 e 1 fn_ctrl_swap
418 1 e 1 sticky_fn
419 1 e 1 power_management_beeps
420 1 e 1 low_battery_beep
421 1 e 9 sata_mode
#422 562 r 0 unused

View File

@ -15,3 +15,4 @@ bluetooth=Enable
fn_ctrl_swap=Disable
sticky_fn=Disable
power_management_beeps=Enable
low_battery_beep=Enable

View File

@ -115,6 +115,7 @@ entries
1085 1 e 1 fn_ctrl_swap
1086 1 e 1 sticky_fn
1087 1 e 1 power_management_beeps
1088 1 e 1 low_battery_beep
# -----------------------------------------------------------------
enumerations