summaryrefslogtreecommitdiff
path: root/src/ec/lenovo
diff options
context:
space:
mode:
Diffstat (limited to 'src/ec/lenovo')
-rw-r--r--src/ec/lenovo/h8/h8.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 8dfec0614c..e44a2781f5 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -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;