diff options
author | Bill Richardson <wfrichar@chromium.org> | 2013-12-12 11:03:17 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-12-13 01:13:44 +0000 |
commit | d3fdf5e6f3243484328d3d954a1924b355ff9c21 (patch) | |
tree | 209bbeb6cc1f4e65457f2600d11a51ef04f5ef09 /include/dptf.h | |
parent | df50fccf8e87bbf0328e58bd012b577bd4c7658a (diff) | |
download | chrome-ec-d3fdf5e6f3243484328d3d954a1924b355ff9c21.tar.gz |
Add stubs for DPTF thermal thresholds
This adds three new registers to the ACPI->EC interface, which will allow
the AP to set/clear two DPTF thermal threshold points for each temp sensor.
The registers are
EC_ACPI_MEM_TEMP_ID 0x05
EC_ACPI_MEM_TEMP_THRESHOLD 0x06
EC_ACPI_MEM_TEMP_COMMIT 0x07
It doesn't actually do anything yet, but the AP can now write those values.
BUG=chrome-os-partner:23970
BRANCH=none
TEST=manual
On the host:
dptf() {
[ "$#" -eq "2" ] || return;
iotools io_write8 0x66 0x81
iotools io_write8 0x62 $1
iotools io_write8 0x62 $2
}
Now watch the EC console while running on the host:
dptf 5 1
dptf 6 80
dptf 7 2
dptf 7 3
The EC should say
DPTF sensor 1, threshold 7 C, index 0, enabled
DPTF sensor 1, threshold 7 C, index 1, enabled
Change-Id: I71fa57e3ca7c7b5bb8892e63212bf294b44dece5
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/179778
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/dptf.h')
-rw-r--r-- | include/dptf.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/dptf.h b/include/dptf.h index 48be860f2d..4213426255 100644 --- a/include/dptf.h +++ b/include/dptf.h @@ -11,7 +11,13 @@ /* 0-100% sets fixed duty cycle, out of range means let the EC drive */ void dptf_set_fan_duty_target(int pct); -/* 0-100% if in duty mode. -1 if not */ +/* 0-100% if in duty mode. -1 if not */ int dptf_get_fan_duty_target(void); +/* Each temp sensor can have up to two thresholds */ +void dptf_set_temp_threshold(int sensor_id, /* zero-based sensor index */ + int temp, /* in degrees K */ + int idx, /* which threshold (0 or 1) */ + int enable); /* true = on, false = off */ + #endif /* __CROS_EC_DPTF_H */ |