summaryrefslogtreecommitdiff
path: root/chip/lm4/lpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/lm4/lpc.c')
-rw-r--r--chip/lm4/lpc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c
index afbe31f717..0b9ec2771a 100644
--- a/chip/lm4/lpc.c
+++ b/chip/lm4/lpc.c
@@ -8,6 +8,7 @@
#include "clock.h"
#include "common.h"
#include "console.h"
+#include "dptf.h"
#include "gpio.h"
#include "hooks.h"
#include "host_command.h"
@@ -412,7 +413,7 @@ static void handle_acpi_write(int is_cmd)
/* Process complete commands */
if (acpi_cmd == EC_CMD_ACPI_READ && acpi_data_count == 1) {
/* ACPI read cmd + addr */
- int result = 0;
+ int result = 0xff; /* value for bogus read */
switch (acpi_addr) {
case EC_ACPI_MEM_VERSION:
@@ -437,6 +438,12 @@ static void handle_acpi_write(int is_cmd)
result = pwm_get_duty(PWM_CH_KBLIGHT);
break;
#endif
+#ifdef CONFIG_FANS
+ case EC_ACPI_MEM_FAN_DUTY:
+ /** TODO(crosbug.com/p/23774): Fix this too */
+ result = dptf_get_fan_duty_target();
+ break;
+#endif
default:
break;
}
@@ -463,6 +470,12 @@ static void handle_acpi_write(int is_cmd)
pwm_set_duty(PWM_CH_KBLIGHT, data);
break;
#endif
+#ifdef CONFIG_FANS
+ case EC_ACPI_MEM_FAN_DUTY:
+ /** TODO(crosbug.com/p/23774): Fix this too */
+ dptf_set_fan_duty_target(data);
+ break;
+#endif
default:
CPRINTF("[%T ACPI write 0x%02x = 0x%02x]\n",
acpi_addr, data);