coreboot/src/mainboard
Alexey Kharlamov 93d6ba0889 ec/lenovo/h8: Implement ACPI methods to set battery thresholds
There are two known reverse-engineered 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 and X220 with 4.20.11.
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
Reviewed-on: https://review.coreboot.org/c/coreboot/+/23178
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-03-06 20:00:00 +00:00
..
adi device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00
adlink
advansus arch/io.h: Drop includes in fam10 romstages 2019-03-05 16:19:37 +00:00
amd arch/io.h: Drop includes in fam10 romstages 2019-03-05 16:19:37 +00:00
aopen arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
apple arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
asrock Remove DEFAULT_PCIEXBAR alias 2019-03-06 11:54:17 +00:00
asus arch/io.h: Drop includes in fam10 romstages 2019-03-05 16:19:37 +00:00
avalue arch/io.h: Drop includes in fam10 romstages 2019-03-05 16:19:37 +00:00
bap arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
biostar device/pnp: Add header files for PNP ops 2019-03-04 15:58:55 +00:00
cavium
compulab device/pci: Fix PCI accessor headers 2019-03-01 20:32:15 +00:00
cubietech device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00
elmex device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00
emulation mb/qemu-{i440fx,q35}: Use POSTCAR stage to load the ramstage 2019-03-05 19:35:37 +00:00
esd
facebook sb/intel/common: Show "Add gigabit ethernet firmware" only for boards that need it 2019-01-25 11:19:51 +00:00
foxconn arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
getac device/pnp: Add header files for PNP ops 2019-03-04 15:58:55 +00:00
gigabyte arch/io.h: Drop includes in fam10 romstages 2019-03-05 16:19:37 +00:00
gizmosphere device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00
google Remove DEFAULT_PCIEXBAR alias 2019-03-06 11:54:17 +00:00
hp device/pnp: Add header files for PNP ops 2019-03-04 15:58:55 +00:00
ibase device/pnp: Add header files for PNP ops 2019-03-04 15:58:55 +00:00
iei arch/io.h: Drop includes in fam10 romstages 2019-03-05 16:19:37 +00:00
intel Remove DEFAULT_PCIEXBAR alias 2019-03-06 11:54:17 +00:00
jetway arch/io.h: Drop includes in fam10 romstages 2019-03-05 16:19:37 +00:00
kontron device/pnp: Add header files for PNP ops 2019-03-04 15:58:55 +00:00
lenovo ec/lenovo/h8: Implement ACPI methods to set battery thresholds 2019-03-06 20:00:00 +00:00
lippert device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00
msi arch/io.h: Drop includes in fam10 romstages 2019-03-05 16:19:37 +00:00
ocp mainboard: Enable PRESERVE flag in all vboot/chromeos FMD files 2019-03-05 20:52:06 +00:00
opencellular mainboard: Enable PRESERVE flag in all vboot/chromeos FMD files 2019-03-05 20:52:06 +00:00
packardbell arch/x86/acpi: Remove obsolete acpi_gen_regaddr resv field 2019-03-04 13:16:29 +00:00
pcengines device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00
purism soc/intel/skylake: Unify serial IRQ options 2019-03-01 10:07:10 +00:00
roda device/pnp: Add header files for PNP ops 2019-03-04 15:58:55 +00:00
samsung mainboard: Enable PRESERVE flag in all vboot/chromeos FMD files 2019-03-05 20:52:06 +00:00
sapphire arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
scaleway ACPI: Rename FADT model and set it to zero 2019-03-01 10:02:29 +00:00
siemens mb/siemens/{mc_apl1,mc_tcu3}: Fix typo on "Display" 2019-03-06 19:57:25 +00:00
sifive arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
supermicro Remove DEFAULT_PCIEXBAR alias 2019-03-06 11:54:17 +00:00
ti device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00
tyan arch/io.h: Drop includes in fam10 romstages 2019-03-05 16:19:37 +00:00
via arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
Kconfig