Re: [ibm-acpi-devel] [PATCH v11 1/5] battery: Add the battery hooking API

2018-01-01 Thread Andy Shevchenko
On Sun, Dec 31, 2017 at 4:16 PM, 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 w

Re: [ibm-acpi-devel] [PATCH v11 2/5] pm: add to_power_supply macro to the API

2018-01-01 Thread Andy Shevchenko
On Sun, Dec 31, 2017 at 4:17 PM, Ognjen Galic wrote: > 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 vi

Re: [ibm-acpi-devel] [PATCH v11 5/5] pm: Remove to_power_supply impl in ds278*

2018-01-01 Thread Andy Shevchenko
On Sun, Dec 31, 2017 at 4:17 PM, Ognjen Galic wrote: > This patch fixes a issue introduced by patch: > pm: add to_power_supply macro to the API > > In that patch a new macro has been defined in the > power_supply.h header with the same name as the private > function name in the ds278* battery modu

Re: [ibm-acpi-devel] [PATCH v11 3/5] thinkpad_acpi: Add support for battery thresholds

2018-01-01 Thread Andy Shevchenko
On Sun, Dec 31, 2017 at 4:17 PM, Ognjen Galic wrote: > 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) Ch

Re: [ibm-acpi-devel] [PATCH v11 3/5] thinkpad_acpi: Add support for battery thresholds

2018-01-01 Thread Ognjen Galić
On Mon, Jan 01, 2018 at 12:24:39PM +0200, Andy Shevchenko wrote: > On Sun, Dec 31, 2017 at 4:17 PM, Ognjen Galic wrote: > > thinkpad_acpi registers two new attributes for each battery: > > > > 1) Charge start threshold > > /sys/class/power_supply/BATN/charge_start_threshold > > > > Valid values ar

Re: [ibm-acpi-devel] [PATCH v11 3/5] thinkpad_acpi: Add support for battery thresholds

2018-01-01 Thread Rafael J. Wysocki
On Mon, Jan 1, 2018 at 12:43 PM, Ognjen Galić wrote: > On Mon, Jan 01, 2018 at 12:24:39PM +0200, Andy Shevchenko wrote: >> On Sun, Dec 31, 2017 at 4:17 PM, Ognjen Galic wrote: >> > thinkpad_acpi registers two new attributes for each battery: >> > >> > 1) Charge start threshold >> > /sys/class/pow