linux/include/acpi
Ognjen Galic fa93854f7a battery: Add the battery hooking API
This is a patch that implements a generic hooking API for the
generic ACPI battery driver.

With this new generic API, drivers can expose platform specific
behaviour via sysfs attributes in /sys/class/power_supply/BATn/
in a generic way.

A perfect example of the need for this API are Lenovo ThinkPads.

Lenovo ThinkPads have a ACPI extension that allows the setting of
start and stop charge thresholds in the EC and battery firmware
via ACPI. The thinkpad_acpi module can use this API to expose
sysfs attributes that it controls inside the ACPI battery driver
sysfs tree, under /sys/class/power_supply/BATN/.

The file drivers/acpi/battery.h has been moved to
include/acpi/battery.h and the includes inside ac.c, sbs.c, and
battery.c have been adjusted to reflect that.

When drivers hooks into the API, the API calls add_battery() for
each battery in the system that passes it a acpi_battery
struct. Then, the drivers can use device_create_file() to create
new sysfs attributes with that struct and identify the batteries
for per-battery attributes.

Signed-off-by: Ognjen Galic <smclt30p@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-02-21 23:27:13 +01:00
..
platform ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
acbuffer.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
acconfig.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
acexcep.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
acnames.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
acoutput.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
acpi_bus.h ACPI: utils: Introduce acpi_dev_get_first_match_name() 2018-01-10 00:41:43 +01:00
acpi_drivers.h ACPI / EC: Fix regression related to PM ops support in ECDT device 2017-11-21 00:13:02 +01:00
acpi_io.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpi_lpat.h ACPI / LPAT: Common table processing functions 2015-01-29 21:02:10 +08:00
acpi_numa.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpi.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
acpiosxf.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
acpixf.h ACPICA: Update version to 20180105 2018-02-06 10:32:13 +01:00
acrestyp.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
actbl1.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
actbl2.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
actbl3.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
actbl.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
actypes.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
acuuid.h ACPICA: All acpica: Update copyrights to 2018 2018-02-06 10:31:20 +01:00
apei.h Merge branches 'acpi-pmic', 'acpi-apei' and 'acpi-x86' 2017-11-13 01:37:17 +01:00
battery.h battery: Add the battery hooking API 2018-02-21 23:27:13 +01:00
button.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cppc_acpi.h ACPI / CPPC: add sysfs entries for CPPC perf capabilities 2017-04-18 23:37:50 +02:00
ghes.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hed.h ACPI Hardware Error Device (PNP0C33) support 2010-05-19 22:40:24 -04:00
pcc.h mailbox: PCC: Move the MAX_PCC_SUBSPACES definition to header file 2017-11-09 00:39:53 +01:00
pdc_intel.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
processor.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
reboot.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
video.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00