system]
url:
https://github.com/0day-ci/linux/commits/Ognjen-Galic/battery-Add-the-battery-hooking-API/20171223-144855
base: git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git
for-next
config: x86_64-acpi-redef (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1
6/for-next]
> [also build test WARNING on v4.15-rc4 next-20171222]
> [cannot apply to pm/linux-next]
> [if your patch is applied to the wrong git tree, please drop us a note to
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Ognjen-Galic/battery-
On Sat, Dec 23, 2017 at 12:59:45PM +0100, Rafael J. Wysocki wrote:
> On Sat, Dec 23, 2017 at 11:52 AM, Ognjen Galic wrote:
> > 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
> >
On Sat, Dec 23, 2017 at 11:52 AM, Ognjen Galic wrote:
> 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
Fixes: 19380b8e214c ("battery: Add the battery hooking API")
Signed-off-by: Fengguang Wu
---
battery.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 1794408..9324591 100644
--- a/drivers/acpi/battery.c
+++ b/drive
improve the system]
url:
https://github.com/0day-ci/linux/commits/Ognjen-Galic/battery-Add-the-battery-hooking-API/20171223-144855
base: git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git
for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
The EC/ACPI firmware on Lenovo ThinkPads used to report a status
of "Unknown" when the battery is between the charge start and
charge stop thresholds. On Windows, it reports "Not Charging"
so the quirk has been added to also report correctly.
Now the "status" attribute returns "Not Charging" when
thinkpad_acpi registers two new attributes for each battery:
1) Charge start threshold
/sys/class/power_supply/BATN/charge_start_threshold
Valid values are [0, 99]. A value of 0 turns off the
start threshold wear control.
2) Charge stop threshold
/sys/class/power_supply/BATN/charge_stop_threshol
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 ThinkP
This patch adds the to_power_supply macro to upcast
a device to a power_supply struct.
This is needed because the same piece of code using
container_of is used in various other places, so we
abstract away such low-level operations via a macro.
---
v9:
* Split the pm changes from the thinkpad_acpi
improve the system]
url:
https://github.com/0day-ci/linux/commits/Ognjen-Galic/battery-Add-the-battery-hooking-API/20171223-144855
base: git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git
for-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12
11 matches
Mail list logo