| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <acpi/acpi.h> |
| 4 | #include <console/console.h> |
| 5 | #include <ec/smsc/mec1308/ec.h> |
| 6 | #include "ec.h" |
| 7 | |
| 8 | void lumpy_ec_init(void) |
| 9 | { |
| 10 | printk(BIOS_DEBUG, "%s\n", __func__); |
| 11 | |
| 12 | if (acpi_is_wakeup_s3()) |
| 13 | return; |
| 14 | |
| 15 | /* |
| 16 | * Enable EC control of fan speed. |
| 17 | * |
| 18 | * This will be changed to OS control in ACPI EC _REG |
| 19 | * method when the OS is ready to control the fan. |
| 20 | */ |
| 21 | ec_write(EC_FAN_SPEED, 0); |
| 22 | |
| 23 | send_ec_command_data(EC_BATTERY_MODE, EC_BATTERY_MODE_NORMAL); |
| 24 | send_ec_command_data(EC_POWER_BUTTON_MODE, EC_POWER_BUTTON_MODE_OS); |
| 25 | } |