diff options
author | Duncan Laurie <dlaurie@google.com> | 2018-10-15 15:10:21 -0700 |
---|---|---|
committer | Duncan Laurie <dlaurie@chromium.org> | 2018-10-31 18:30:38 +0000 |
commit | 4af38d440d1618e3e837aea016de30004a642e2c (patch) | |
tree | 5e643adfa82756f91d6d7d7087ba65f930c8264c /src/ec/google/wilco/acpi/ac.asl | |
parent | a802be2910735c73f1b3c21dc837ce7750ed4ff7 (diff) | |
download | coreboot-4af38d440d1618e3e837aea016de30004a642e2c.tar.xz |
ec/google/wilco: Add ACPI battery and AC objects
Add the expected objects (_BST, _BIF, _BIX) for reading battery
information and status from the embedded controller, and the
expected objects for reporting AC power status.
The battery was tested by booting with a battery attached and checking
that it is present in /sys/class/power_supply/BAT0 and that the values
are consistent and within expected ranges.
The AC device was tested by checking the AC status in sysfs when AC
is inserted or removed while the system is running.
Change-Id: Ie996891c383c9e990736690aef9795512ad6d35a
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/29123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/ec/google/wilco/acpi/ac.asl')
-rw-r--r-- | src/ec/google/wilco/acpi/ac.asl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ec/google/wilco/acpi/ac.asl b/src/ec/google/wilco/acpi/ac.asl new file mode 100644 index 0000000000..5d51ce4639 --- /dev/null +++ b/src/ec/google/wilco/acpi/ac.asl @@ -0,0 +1,32 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2018 Google LLC + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of + * the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +Device (AC) +{ + Name (_HID, "ACPI0003") + Name (_UID, 1) + Name (_PCL, Package () { \_SB, BAT0, BAT1 }) + + Method (_STA) + { + Return (0xf) + } + + Method (_PSR) + { + Return (R (ACEX)) + } +} |