summaryrefslogtreecommitdiff
path: root/common/keyboard_scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/keyboard_scan.c')
-rw-r--r--common/keyboard_scan.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index 617ae3fc02..6c3756170b 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -913,7 +913,6 @@ void keyboard_scan_task(void *u)
uint32_t local_disable_scanning = 0;
print_state(debounced_state, "init state");
- poll_deadline.val = 0;
keyboard_raw_task_start();
@@ -1079,10 +1078,6 @@ int keyboard_factory_test_scan(void)
keyboard_scan_enable(0, KB_SCAN_DISABLE_LID_CLOSED);
flags = gpio_get_default_flags(GPIO_KBD_KSO2);
- if (IS_ENABLED(CONFIG_ZEPHYR))
- /* set all KSI/KSO pins to GPIO_ALT_FUNC_NONE */
- keybaord_raw_config_alt(0);
-
/* Set all of KSO/KSI pins to internal pull-up and input */
for (i = 0; i < keyboard_factory_scan_pins_used; i++) {
if (keyboard_factory_scan_pins[i][0] < 0)
@@ -1091,9 +1086,7 @@ int keyboard_factory_test_scan(void)
port = keyboard_factory_scan_pins[i][0];
id = keyboard_factory_scan_pins[i][1];
- if (!IS_ENABLED(CONFIG_ZEPHYR))
- gpio_set_alternate_function(port, 1 << id,
- GPIO_ALT_FUNC_NONE);
+ gpio_set_alternate_function(port, 1 << id, GPIO_ALT_FUNC_NONE);
gpio_set_flags_by_mask(port, 1 << id,
GPIO_INPUT | GPIO_PULL_UP);
}
@@ -1126,10 +1119,7 @@ int keyboard_factory_test_scan(void)
GPIO_INPUT | GPIO_PULL_UP);
}
done:
- if (IS_ENABLED(CONFIG_ZEPHYR))
- keybaord_raw_config_alt(1);
- else
- gpio_config_module(MODULE_KEYBOARD_SCAN, 1);
+ gpio_config_module(MODULE_KEYBOARD_SCAN, 1);
gpio_set_flags(GPIO_KBD_KSO2, flags);
keyboard_scan_enable(1, KB_SCAN_DISABLE_LID_CLOSED);