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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user