blob: 0871f8f2f970d5dcb338abe5a2c9d3acf11a7a21 [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Kyösti Mälkki5687fc92013-11-28 18:11:49 +02002
3#ifndef __BOOTMODE_H__
4#define __BOOTMODE_H__
5
Kyösti Mälkkie50bb8f2021-11-02 18:16:32 +02006#include <stdbool.h>
7
Kyösti Mälkkie3ddee02014-05-03 10:45:28 +03008/* functions implemented per mainboard: */
Kyösti Mälkki16455892014-04-28 23:41:06 +03009int get_write_protect_state(void);
Kyösti Mälkki5687fc92013-11-28 18:11:49 +020010int get_recovery_mode_switch(void);
Furquan Shaikh470852b2016-11-05 23:52:08 -070011int get_recovery_mode_retrain_switch(void);
Sheng-Liang Song1d6560f2014-04-30 15:46:45 -070012int clear_recovery_mode_switch(void);
Vadim Bendeburyfe4253c2015-03-12 19:22:51 -070013int get_wipeout_mode_switch(void);
Patrick Georgi08b87852015-05-28 11:59:33 +020014int get_lid_switch(void);
Hsuan-ting Chen642508a2021-10-27 10:59:41 +000015int get_ec_is_trusted(void);
Sheng-Liang Song1d6560f2014-04-30 15:46:45 -070016
Aaron Durbinbc98cc62015-09-02 09:21:36 -050017/* Return 1 if display initialization is required. 0 if not. */
18int display_init_required(void);
Kyösti Mälkkiab56b3b2013-11-28 16:44:51 +020019int gfx_get_init_done(void);
20void gfx_set_init_done(int done);
21
Bill XIE516c0a52020-02-24 23:08:35 +080022/*
23 * Determine if the platform is resuming from suspend. Returns 0 when
24 * not resuming, > 0 if resuming, and < 0 on error.
25 */
26int platform_is_resuming(void);
27
Kyösti Mälkki5687fc92013-11-28 18:11:49 +020028#endif /* __BOOTMODE_H__ */