platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Sebastian Reichel" <sebastian.reichel@collabora.com>,
	"Thomas Weißschuh" <linux@weissschuh.net>
Cc: linux-pm@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	Mark Gross <markgross@kernel.org>,
	Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	linux-kernel@vger.kernel.org, linrunner@gmx.net,
	bberg@redhat.com, hadess@hadess.net, markpearson@lenovo.com,
	nicolopiazzalunga@gmail.com, njoshi1@lenovo.com,
	smclt30p@gmail.com
Subject: Re: [PATCH 0/4] power: supply: add charge_behaviour property (force-discharge, inhibit-charge)
Date: Tue, 21 Dec 2021 17:06:04 +0100	[thread overview]
Message-ID: <b858c808-6153-66fd-beb5-68595b148a7e@redhat.com> (raw)
In-Reply-To: <20211203213305.dfjedjj3b25ftj2z@earth.universe>

Hi,

On 12/3/21 22:33, Sebastian Reichel wrote:
> Hi,
> 
> On Wed, Nov 24, 2021 at 12:27:00AM +0100, Thomas Weißschuh wrote:
>> This series adds support for the charge_behaviour property to the power
>> subsystem and thinkpad_acpi driver.
>>
>> As thinkpad_acpi has to use the 'struct power_supply' created by the generic
>> ACPI driver it has to rely on custom sysfs attributes instead of proper
>> power_supply properties to implement this property.
>>
>> Patch 1: Adds the power_supply documentation and basic public API
>> Patch 2: Adds helpers to power_supply core to help drivers implement the
>>   charge_behaviour attribute
>> Patch 3: Adds support for force-discharge to thinkpad_acpi.
>> Patch 4: Adds support for inhibit-discharge to thinkpad_acpi.
>>
>> Patch 3 and 4 are largely taken from other patches and adapted to the new API.
>> (Links are in the patch trailer)
>>
>> Ognjen Galic:
>>
>> Your S-o-b is on the original inhibit_charge and force_discharge patches.
>> I would like to add you as Co-developed-by but to do that it will also require
>> your S-o-b. Could you give your sign-offs for the new patches, so you can be
>> properly attributed?
>>
>> Sebastian Reichel:
>>
>> Currently the series does not actually support the property as a proper
>> powersupply property handled fully by power_supply_sysfs.c because there would
>> be no user for this property.
> 
> I'm not too happy how the acpi-battery hooks work, but that's not
> your fault and this patchset does not really make the situation
> worse. So:
> 
> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

Sebastian, I have taken the liberty to assume that this means that you are
ok with merging the entire series through the pdx86 tree (I've done a test-merge
with linux-power-supply/for-next and there are no conflicts).

Thomas, Thank you for your patch-series, I've applied the series
to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans





> 
> -- Sebastian
> 
>> Previous discussions about the API:
>>
>> https://lore.kernel.org/platform-driver-x86/20211108192852.357473-1-linux@weissschuh.net/
>> https://lore.kernel.org/platform-driver-x86/21569a89-8303-8573-05fb-c2fec29983d1@gmail.com/
>>
>> v1: https://lore.kernel.org/lkml/20211113104225.141333-1-linux@weissschuh.net/
>> v1 -> v2:
>>
>> * Use sysfs_emit-APIs instead of plain sprintf
>> * More cecks for actual feature availability
>> * Validation of the written values
>> * Read inhibit-charge via BICG instead of PSSG (peak shift state)
>> * Don't mangle error numbers in charge_behaviour_store()
>>
>> Open points:
>>
>> Thomas Koch has observed that on a T450s with two batteries
>> inhibit-charge on BAT0 will affect both batteries and for BAT1 it is ignored
>> entirely, this seems to be a bug in the EC.
>> On my T460s with two batteries it works correctly.
>>
>> Thomas Weißschuh (4):
>>   power: supply: add charge_behaviour attributes
>>   power: supply: add helpers for charge_behaviour sysfs
>>   platform/x86: thinkpad_acpi: support force-discharge
>>   platform/x86: thinkpad_acpi: support inhibit-charge
>>
>>  Documentation/ABI/testing/sysfs-class-power |  14 ++
>>  drivers/platform/x86/thinkpad_acpi.c        | 191 +++++++++++++++++++-
>>  drivers/power/supply/power_supply_sysfs.c   |  51 ++++++
>>  include/linux/power_supply.h                |  16 ++
>>  4 files changed, 268 insertions(+), 4 deletions(-)
>>
>>
>> base-commit: 66f4beaa6c1d28161f534471484b2daa2de1dce0
>> -- 
>> 2.34.0
>>


  parent reply	other threads:[~2021-12-21 16:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 23:27 [PATCH 0/4] power: supply: add charge_behaviour property (force-discharge, inhibit-charge) Thomas Weißschuh
2021-11-23 23:27 ` [PATCH v2 1/4] power: supply: add charge_behaviour attributes Thomas Weißschuh
2021-11-23 23:27 ` [PATCH v2 2/4] power: supply: add helpers for charge_behaviour sysfs Thomas Weißschuh
2021-11-23 23:27 ` [PATCH v2 3/4] platform/x86: thinkpad_acpi: support force-discharge Thomas Weißschuh
2021-11-23 23:27 ` [PATCH v2 4/4] platform/x86: thinkpad_acpi: support inhibit-charge Thomas Weißschuh
2021-11-25 18:04 ` [ibm-acpi-devel] [PATCH 0/4] power: supply: add charge_behaviour property (force-discharge, inhibit-charge) Kevin Locke
2021-12-03 21:33 ` Sebastian Reichel
2021-12-04 13:56   ` Hans de Goede
2021-12-16 15:41   ` Hans de Goede
2021-12-21 16:06   ` Hans de Goede [this message]
2021-12-04 16:04 ` Thomas Koch
  -- strict thread matches above, loose matches on Subject: below --
2021-11-13 10:42 Thomas Weißschuh
2021-11-16 16:56 ` Thomas Koch
2021-11-17 17:57   ` Thomas Weißschuh
2021-11-17 18:36     ` Thomas Koch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b858c808-6153-66fd-beb5-68595b148a7e@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=bberg@redhat.com \
    --cc=hadess@hadess.net \
    --cc=hmh@hmh.eng.br \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=linrunner@gmx.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=markgross@kernel.org \
    --cc=markpearson@lenovo.com \
    --cc=nicolopiazzalunga@gmail.com \
    --cc=njoshi1@lenovo.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=smclt30p@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).