File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,16 @@ struct ec_response_fp_led_level {
200200 uint8_t level ;
201201} __ec_align1 ;
202202
203+ /*****************************************************************************/
204+ /*
205+ * This command return the chassis status
206+ */
207+ #define EC_CMD_CHASSIS_OPEN_CHECK 0x3E0F
208+
209+ struct ec_response_chassis_open_check {
210+ uint8_t status ;
211+ } __ec_align1 ;
212+
203213/*****************************************************************************/
204214/*
205215 * This command uses to notify the EC that the system is in ACPI mode.
Original file line number Diff line number Diff line change @@ -269,6 +269,19 @@ static enum ec_status fp_led_level_control(struct host_cmd_handler_args *args)
269269}
270270DECLARE_HOST_COMMAND (EC_CMD_FP_LED_LEVEL_CONTROL , fp_led_level_control , EC_VER_MASK (0 ));
271271
272+ static enum ec_status chassis_open_check (struct host_cmd_handler_args * args )
273+ {
274+ struct ec_response_chassis_open_check * r = args -> response ;
275+ int status = gpio_pin_get_dt (GPIO_DT_FROM_NODELABEL (gpio_chassis_open_l ));
276+
277+ r -> status = !status & 0x01 ;
278+ args -> response_size = sizeof (* r );
279+
280+ return EC_RES_SUCCESS ;
281+
282+ }
283+ DECLARE_HOST_COMMAND (EC_CMD_CHASSIS_OPEN_CHECK , chassis_open_check , EC_VER_MASK (0 ));
284+
272285static enum ec_status enter_acpi_mode (struct host_cmd_handler_args * args )
273286{
274287 hook_call_deferred (& sci_enable_data , 250 * MSEC );
You can’t perform that action at this time.
0 commit comments