mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
x86power module is not present on bds board
On bds, always send the keyboard scan code for the power button. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=none Change-Id: I56ad8c9dd67edfd54190d64f16742896a86b9ac1
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
TASK(TEMPSENSOR, temp_sensor_task, NULL) \
|
||||
TASK(KEYSCAN, keyboard_scan_task, NULL) \
|
||||
TASK(POWERBTN, power_button_task, NULL) \
|
||||
TASK(X86POWER, x86_power_task, NULL) \
|
||||
TASK(CONSOLE, console_task, NULL) \
|
||||
TASK(HOSTCMD, host_command_task, NULL) \
|
||||
TASK(I8042CMD, i8042_command_task, NULL)
|
||||
|
||||
@@ -542,13 +542,16 @@ void keyboard_set_power_button(int pressed)
|
||||
|
||||
power_button_pressed = pressed;
|
||||
|
||||
if (x86_power_in_S0()) {
|
||||
code_set = acting_code_set(scancode_set);
|
||||
ret = i8042_send_to_host(
|
||||
(code_set == SCANCODE_SET_2 && !pressed) ? 3 : 2,
|
||||
code[code_set - SCANCODE_SET_1][pressed]);
|
||||
ASSERT(ret == EC_SUCCESS);
|
||||
}
|
||||
#ifdef CONFIG_TASK_X86POWER
|
||||
/* Only send the scan code if x86 is fully awake */
|
||||
if (!x86_power_in_S0())
|
||||
return;
|
||||
#endif
|
||||
code_set = acting_code_set(scancode_set);
|
||||
ret = i8042_send_to_host(
|
||||
(code_set == SCANCODE_SET_2 && !pressed) ? 3 : 2,
|
||||
code[code_set - SCANCODE_SET_1][pressed]);
|
||||
ASSERT(ret == EC_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user