ec/lenovo/h8: Add an option to swap ctrl and fn.

Tested on my X201 and X230.

Change-Id: I3c7ec65681157d15c6e87eea64779a08e03ae5a8
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4660
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Vladimir Serbinenko
2014-01-11 10:29:14 +01:00
parent 1287416822
commit fc7090b249
6 changed files with 18 additions and 1 deletions

View File

@ -62,6 +62,14 @@ static void h8_wwan_enable(int on)
ec_clr_bit(0x3a, 6);
}
static void h8_fn_ctrl_swap(int on)
{
if (on)
ec_set_bit(0xce, 4);
else
ec_clr_bit(0xce, 4);
}
static void h8_log_ec_version(void)
{
char ecfw[17];
@ -190,6 +198,10 @@ static void h8_enable(device_t dev)
h8_wwan_enable(val);
if (get_option(&val, "fn_ctrl_swap") != CB_SUCCESS)
val = 0;
h8_fn_ctrl_swap(val);
if (get_option(&val, "first_battery") != CB_SUCCESS)
val = 1;