Angel Pons | 9b10c09 | 2020-04-05 13:21:20 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Duncan Laurie | 81485d2 | 2016-10-28 09:13:52 -0700 | [diff] [blame] | 2 | |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame] | 3 | #include <acpi/acpi.h> |
Duncan Laurie | 81485d2 | 2016-10-28 09:13:52 -0700 | [diff] [blame] | 4 | #include <ec/google/chromeec/ec.h> |
| 5 | #include "ec.h" |
| 6 | |
| 7 | void mainboard_ec_init(void) |
| 8 | { |
Furquan Shaikh | 2749c52 | 2017-10-04 14:01:41 -0700 | [diff] [blame] | 9 | const struct google_chromeec_event_info info = { |
| 10 | .log_events = MAINBOARD_EC_LOG_EVENTS, |
| 11 | .sci_events = MAINBOARD_EC_SCI_EVENTS, |
| 12 | .s3_wake_events = MAINBOARD_EC_S3_WAKE_EVENTS, |
| 13 | .s3_device_events = MAINBOARD_EC_S3_DEVICE_EVENTS, |
| 14 | .s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS, |
| 15 | }; |
Duncan Laurie | 81485d2 | 2016-10-28 09:13:52 -0700 | [diff] [blame] | 16 | |
Furquan Shaikh | 2749c52 | 2017-10-04 14:01:41 -0700 | [diff] [blame] | 17 | google_chromeec_events_init(&info, acpi_is_wakeup_s3()); |
Matt DeVillier | e4f7c8f | 2020-12-18 20:45:22 -0600 | [diff] [blame^] | 18 | |
| 19 | /* Turn off keyboard backlight after turning on in romstage */ |
| 20 | if (!acpi_is_wakeup_s3()) |
| 21 | google_chromeec_kbbacklight(0); |
Duncan Laurie | 81485d2 | 2016-10-28 09:13:52 -0700 | [diff] [blame] | 22 | } |