Evgeny Zinoviev uploaded patch set #26 to the change originally created by Alexey Derlaft.

View Change

ec/lenovo/h8: Implement ACPI methods to set battery thresholds

There are two known (yet) different ways to manage battery thresholds.
This patch implements them and adds a way to enable them for
different mainboards.

Tested on W530 with 4.18.3-gentoo kernel. Works fine with new
Linux userspace API for controlling battery thresholds, available since
4.17.
(/sys/class/power_supply/BAT0/charge_(start|stop)_threshold).

The new API is supported by TLP (you might need to set NATACPI_ENABLE=1
in /etc/tlp.conf).

tpacpi-bat works fine too.

Signed-off-by: Alexey Kharlamov <der@2-47.ru>
Signed-off-by: Evgeny Zinoviev <me@ch1p.com>

Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
---
M src/ec/lenovo/h8/Kconfig
M src/ec/lenovo/h8/acpi/thinkpad.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds_24.asl
A src/ec/lenovo/h8/acpi/thinkpad_bat_thresholds_b0.asl
M src/mainboard/lenovo/t400/Kconfig
M src/mainboard/lenovo/t400/acpi/ec.asl
M src/mainboard/lenovo/t420/Kconfig
M src/mainboard/lenovo/t420/acpi/ec.asl
M src/mainboard/lenovo/t420s/Kconfig
M src/mainboard/lenovo/t420s/acpi/ec.asl
M src/mainboard/lenovo/t430/Kconfig
M src/mainboard/lenovo/t430/acpi/ec.asl
M src/mainboard/lenovo/t430s/Kconfig
M src/mainboard/lenovo/t430s/acpi/ec.asl
M src/mainboard/lenovo/t520/Kconfig
M src/mainboard/lenovo/t520/acpi/ec.asl
M src/mainboard/lenovo/t530/Kconfig
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/mainboard/lenovo/x1_carbon_gen1/Kconfig
M src/mainboard/lenovo/x1_carbon_gen1/acpi/ec.asl
M src/mainboard/lenovo/x200/Kconfig
M src/mainboard/lenovo/x200/acpi/ec.asl
M src/mainboard/lenovo/x201/Kconfig
M src/mainboard/lenovo/x201/acpi/ec.asl
M src/mainboard/lenovo/x220/Kconfig
M src/mainboard/lenovo/x220/acpi/ec.asl
M src/mainboard/lenovo/x230/Kconfig
M src/mainboard/lenovo/x230/acpi/ec.asl
29 files changed, 461 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/23178/26

To view, visit change 23178. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2a90f9e9b32462b8a5e9bc8d3087ae0fea563ea5
Gerrit-Change-Number: 23178
Gerrit-PatchSet: 26
Gerrit-Owner: Alexey Derlaft <derlafff@ya.ru>
Gerrit-Reviewer: Alexander Couzens <lynxis@fe80.eu>
Gerrit-Reviewer: Alexey Derlaft <derlafff@ya.ru>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Evgeny Zinoviev <me@ch1p.com>
Gerrit-Reviewer: Marcello Sylvester Bauer <sylvblck@sylv.io>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-MessageType: newpatchset