diff options
author | njl <njl@FreeBSD.org> | 2005-02-19 06:13:26 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-02-19 06:13:26 +0000 |
commit | 2aa2e45138653334db624932dcc1a0642cfb7a65 (patch) | |
tree | 8cd3ffdd88fafe4fa14363f30a75e38b08c917e1 /sys/dev/acpica | |
parent | 699536634eb7d2f27e7186f8391a1793c18922b0 (diff) | |
download | FreeBSD-src-2aa2e45138653334db624932dcc1a0642cfb7a65.zip FreeBSD-src-2aa2e45138653334db624932dcc1a0642cfb7a65.tar.gz |
Add a new field to struct cf_setting for special values. These are driver-
specific values that other components may want to use. Add support to
acpi_perf(4) to export the control and status values via this field.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/acpi_perf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index 539a06a..040f2d5 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -64,7 +64,11 @@ struct acpi_px { uint32_t sts_val; }; -#define MAX_PX_STATES 16 +/* Offsets in struct cf_setting array for storing driver-specific values. */ +#define PX_SPEC_CONTROL 0 +#define PX_SPEC_STATUS 1 + +#define MAX_PX_STATES 16 struct acpi_perf_softc { device_t dev; @@ -389,6 +393,8 @@ acpi_px_to_set(device_t dev, struct acpi_px *px, struct cf_setting *set) set->lat = px->trans_lat; set->volts = CPUFREQ_VAL_UNKNOWN; set->dev = dev; + set->spec[PX_SPEC_CONTROL] = px->ctrl_val; + set->spec[PX_SPEC_STATUS] = px->sts_val; return (0); } |