summaryrefslogtreecommitdiff
path: root/src/drivers/intel/dptf
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2020-05-29 14:39:02 -0600
committerPatrick Georgi <pgeorgi@google.com>2020-07-07 17:23:01 +0000
commit2ad8ffed6fc3d0865d8dc066dcbf6ef2e369794c (patch)
tree65b322f3ee2f04ab8ca8bfbf632ba260426cb4dd /src/drivers/intel/dptf
parent46f6fcf88f2db397759f69d0c7ddf11d88b61e03 (diff)
dptf: Add support for Fan Performance States
This change adds support for generating the _FPS table for the DPTF Fan object. The table describes different levels of fan activity that may be applied to the system in order to actively cool it. The information includes fan speed at a (rough) percentage level, fan speed in RPM, potential noise level in centibels, and power in mA. BUG=b:143539650 TEST=compiles Change-Id: I5591eb527f496d0c4c613352d2a87625d47d9273 Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41889 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/drivers/intel/dptf')
-rw-r--r--src/drivers/intel/dptf/chip.h1
-rw-r--r--src/drivers/intel/dptf/dptf.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/intel/dptf/chip.h b/src/drivers/intel/dptf/chip.h
index 528ba8354e..cc4ae47caf 100644
--- a/src/drivers/intel/dptf/chip.h
+++ b/src/drivers/intel/dptf/chip.h
@@ -14,6 +14,7 @@ struct drivers_intel_dptf_config {
struct {
struct dptf_charger_perf charger_perf[DPTF_MAX_CHARGER_PERF_STATES];
+ struct dptf_fan_perf fan_perf[DPTF_MAX_FAN_PERF_STATES];
} controls;
};
diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c
index a20087fff3..bfc04200e0 100644
--- a/src/drivers/intel/dptf/dptf.c
+++ b/src/drivers/intel/dptf/dptf.c
@@ -74,6 +74,7 @@ static void dptf_fill_ssdt(const struct device *dev)
/* Controls */
dptf_write_charger_perf(config->controls.charger_perf, DPTF_MAX_CHARGER_PERF_STATES);
+ dptf_write_fan_perf(config->controls.fan_perf, DPTF_MAX_FAN_PERF_STATES);
printk(BIOS_INFO, "\\_SB.DPTF: %s at %s\n", dev->chip_ops->name, dev_path(dev));
}