1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <ec/acpi/ec.h>
11 * HACK: Use Fn-Key as recovery mode switch.
12 * Wait for sense register ready and read Fn-Key state.
14 int get_recovery_mode_switch(void)
18 if (!CONFIG(H8_FN_KEY_AS_VBOOT_RECOVERY_SW
))
21 /* Tests showed that it takes:
22 * - 700msec on Lenovo T500 from AC power on
23 * - less than 150msec on Lenovo T520 from AC power on
25 stopwatch_init_msecs_expire(&sw
, 1000);
26 while (!stopwatch_expired(&sw
) && !h8_get_sense_ready())
29 if (!h8_get_sense_ready())
32 return h8_get_fn_key();
36 * Only used if CONFIG(CHROMEOS) is set.
37 * Always zero as the #WP pin of the flash is tied high.
39 int get_write_protect_state(void)