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:
parent
1287416822
commit
fc7090b249
|
@ -62,6 +62,14 @@ static void h8_wwan_enable(int on)
|
||||||
ec_clr_bit(0x3a, 6);
|
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)
|
static void h8_log_ec_version(void)
|
||||||
{
|
{
|
||||||
char ecfw[17];
|
char ecfw[17];
|
||||||
|
@ -190,6 +198,10 @@ static void h8_enable(device_t dev)
|
||||||
|
|
||||||
h8_wwan_enable(val);
|
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)
|
if (get_option(&val, "first_battery") != CB_SUCCESS)
|
||||||
val = 1;
|
val = 1;
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,7 @@ entries
|
||||||
1062 1 e 1 wwan
|
1062 1 e 1 wwan
|
||||||
1064 8 h 0 volume
|
1064 8 h 0 volume
|
||||||
1072 1 e 9 first_battery
|
1072 1 e 9 first_battery
|
||||||
|
1074 1 e 1 fn_ctrl_swap
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
enumerations
|
enumerations
|
||||||
|
|
|
@ -9,3 +9,4 @@ first_battery=Primary
|
||||||
bluetooth=Enable
|
bluetooth=Enable
|
||||||
wwan=Enable
|
wwan=Enable
|
||||||
touchpad=Enable
|
touchpad=Enable
|
||||||
|
fn_ctrl_swap=Disable
|
||||||
|
|
|
@ -90,7 +90,8 @@ entries
|
||||||
412 1 e 1 bluetooth
|
412 1 e 1 bluetooth
|
||||||
413 1 e 1 wwan
|
413 1 e 1 wwan
|
||||||
414 1 e 1 touchpad
|
414 1 e 1 touchpad
|
||||||
#415 569 r 0 unused
|
417 1 e 1 fn_ctrl_swap
|
||||||
|
#419 565 r 0 unused
|
||||||
|
|
||||||
# coreboot config options: check sums
|
# coreboot config options: check sums
|
||||||
984 16 h 0 check_sum
|
984 16 h 0 check_sum
|
||||||
|
|
|
@ -12,3 +12,4 @@ volume=0x3
|
||||||
tft_brightness=0xff
|
tft_brightness=0xff
|
||||||
first_battery=Primary
|
first_battery=Primary
|
||||||
bluetooth=Enable
|
bluetooth=Enable
|
||||||
|
fn_ctrl_swap=Disable
|
||||||
|
|
|
@ -112,6 +112,7 @@ entries
|
||||||
1080 1 e 9 first_battery
|
1080 1 e 9 first_battery
|
||||||
1081 1 e 1 bluetooth
|
1081 1 e 1 bluetooth
|
||||||
1082 1 e 1 wwan
|
1082 1 e 1 wwan
|
||||||
|
1085 1 e 1 fn_ctrl_swap
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
enumerations
|
enumerations
|
||||||
|
|
Loading…
Reference in New Issue