mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
cleaner
This commit is contained in:
1 parent
a98c706755
commit
66d0e16425
1 file changed
-151
@@ -772,157 +772,6 @@ enum ec_mkbp_event {
|
|||||||
EC_MKBP_EVENT_COUNT,
|
EC_MKBP_EVENT_COUNT,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/* Temperature sensor commands */
|
|
||||||
|
|
||||||
/* Read temperature sensor info */
|
|
||||||
#define EC_CMD_TEMP_SENSOR_GET_INFO 0x70
|
|
||||||
|
|
||||||
struct ec_params_temp_sensor_get_info {
|
|
||||||
uint8_t id;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct ec_response_temp_sensor_get_info {
|
|
||||||
char sensor_name[32];
|
|
||||||
uint8_t sensor_type;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Note: host commands 0x80 - 0x87 are reserved to avoid conflict with ACPI
|
|
||||||
* commands accidentally sent to the wrong interface. See the ACPI section
|
|
||||||
* below.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/* Host event commands */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Host event mask params and response structures, shared by all of the host
|
|
||||||
* event commands below.
|
|
||||||
*/
|
|
||||||
struct ec_params_host_event_mask {
|
|
||||||
uint32_t mask;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct ec_response_host_event_mask {
|
|
||||||
uint32_t mask;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
/* These all use ec_response_host_event_mask */
|
|
||||||
#define EC_CMD_HOST_EVENT_GET_B 0x87
|
|
||||||
#define EC_CMD_HOST_EVENT_GET_SMI_MASK 0x88
|
|
||||||
#define EC_CMD_HOST_EVENT_GET_SCI_MASK 0x89
|
|
||||||
#define EC_CMD_HOST_EVENT_GET_WAKE_MASK 0x8d
|
|
||||||
|
|
||||||
/* These all use ec_params_host_event_mask */
|
|
||||||
#define EC_CMD_HOST_EVENT_SET_SMI_MASK 0x8a
|
|
||||||
#define EC_CMD_HOST_EVENT_SET_SCI_MASK 0x8b
|
|
||||||
#define EC_CMD_HOST_EVENT_CLEAR 0x8c
|
|
||||||
#define EC_CMD_HOST_EVENT_SET_WAKE_MASK 0x8e
|
|
||||||
#define EC_CMD_HOST_EVENT_CLEAR_B 0x8f
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/* Switch commands */
|
|
||||||
|
|
||||||
/* Enable/disable LCD backlight */
|
|
||||||
#define EC_CMD_SWITCH_ENABLE_BKLIGHT 0x90
|
|
||||||
|
|
||||||
struct ec_params_switch_enable_backlight {
|
|
||||||
uint8_t enabled;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
/* Enable/disable WLAN/Bluetooth */
|
|
||||||
#define EC_CMD_SWITCH_ENABLE_WIRELESS 0x91
|
|
||||||
#define EC_VER_SWITCH_ENABLE_WIRELESS 1
|
|
||||||
|
|
||||||
/* Version 0 params; no response */
|
|
||||||
struct ec_params_switch_enable_wireless_v0 {
|
|
||||||
uint8_t enabled;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
/* Version 1 params */
|
|
||||||
struct ec_params_switch_enable_wireless_v1 {
|
|
||||||
/* Flags to enable now */
|
|
||||||
uint8_t now_flags;
|
|
||||||
|
|
||||||
/* Which flags to copy from now_flags */
|
|
||||||
uint8_t now_mask;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Flags to leave enabled in S3, if they're on at the S0->S3
|
|
||||||
* transition. (Other flags will be disabled by the S0->S3
|
|
||||||
* transition.)
|
|
||||||
*/
|
|
||||||
uint8_t suspend_flags;
|
|
||||||
|
|
||||||
/* Which flags to copy from suspend_flags */
|
|
||||||
uint8_t suspend_mask;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
/* Version 1 response */
|
|
||||||
struct ec_response_switch_enable_wireless_v1 {
|
|
||||||
/* Flags to enable now */
|
|
||||||
uint8_t now_flags;
|
|
||||||
|
|
||||||
/* Flags to leave enabled in S3 */
|
|
||||||
uint8_t suspend_flags;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/* GPIO commands. Only available on EC if write protect has been disabled. */
|
|
||||||
|
|
||||||
/* Set GPIO output value */
|
|
||||||
#define EC_CMD_GPIO_SET 0x92
|
|
||||||
|
|
||||||
struct ec_params_gpio_set {
|
|
||||||
char name[32];
|
|
||||||
uint8_t val;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
/* Get GPIO value */
|
|
||||||
#define EC_CMD_GPIO_GET 0x93
|
|
||||||
|
|
||||||
/* Version 0 of input params and response */
|
|
||||||
struct ec_params_gpio_get {
|
|
||||||
char name[32];
|
|
||||||
} __packed;
|
|
||||||
struct ec_response_gpio_get {
|
|
||||||
uint8_t val;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
/* Version 1 of input params and response */
|
|
||||||
struct ec_params_gpio_get_v1 {
|
|
||||||
uint8_t subcmd;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
char name[32];
|
|
||||||
} get_value_by_name;
|
|
||||||
struct {
|
|
||||||
uint8_t index;
|
|
||||||
} get_info;
|
|
||||||
};
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct ec_response_gpio_get_v1 {
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
uint8_t val;
|
|
||||||
} get_value_by_name, get_count;
|
|
||||||
struct {
|
|
||||||
uint8_t val;
|
|
||||||
char name[32];
|
|
||||||
uint32_t flags;
|
|
||||||
} get_info;
|
|
||||||
};
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
enum gpio_get_subcmd {
|
|
||||||
EC_GPIO_GET_BY_NAME = 0,
|
|
||||||
EC_GPIO_GET_COUNT = 1,
|
|
||||||
EC_GPIO_GET_INFO = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Resend last response (not supported on LPC).
|
* Resend last response (not supported on LPC).
|
||||||
|
|||||||
Reference in new issue
Block a user