Searched hist:fa93854f (Results 1 – 4 of 4) sorted by relevance
/openbmc/linux/include/acpi/ |
H A D | battery.h | fa93854f Wed Feb 07 08:58:13 CST 2018 Ognjen Galic <smclt30p@gmail.com> 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> fa93854f Wed Feb 07 08:58:13 CST 2018 Ognjen Galic <smclt30p@gmail.com> 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>
|
/openbmc/linux/drivers/acpi/ |
H A D | sbs.c | fa93854f Wed Feb 07 08:58:13 CST 2018 Ognjen Galic <smclt30p@gmail.com> 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>
|
H A D | ac.c | fa93854f Wed Feb 07 08:58:13 CST 2018 Ognjen Galic <smclt30p@gmail.com> 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> fa93854f Wed Feb 07 08:58:13 CST 2018 Ognjen Galic <smclt30p@gmail.com> 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>
|
H A D | battery.c | fa93854f Wed Feb 07 08:58:13 CST 2018 Ognjen Galic <smclt30p@gmail.com> 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>
|