From 4af38d440d1618e3e837aea016de30004a642e2c Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 15 Oct 2018 15:10:21 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/29123 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/ec/google/wilco/acpi/ac.asl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/ec/google/wilco/acpi/ac.asl (limited to 'src/ec/google/wilco/acpi/ac.asl') 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)) + } +} -- cgit v1.2.3