lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 26 Apr 2021 16:40:40 +0800
From:   Chen-Yu Tsai <wens@...e.org>
To:     Hermann.Lauer@...-heidelberg.de
Cc:     Sebastian Reichel <sre@...nel.org>,
        "open list:THERMAL" <linux-pm@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] axp209 PMIC: setting constant_charge_current to 0
 disables battery charging

Hi,

On Wed, Apr 21, 2021 at 5:05 PM <Hermann.Lauer@...-heidelberg.de> wrote:
>
> Dear Maintainers,

First of all, please format the subject line like other commits to the
same file. So that would be:

    power: supply: axp20x_battery: <change>

> this proposed patch allows setting constant_charge_current to 0 on axp209
> PMIC to disable charging. constant_charge_current_max with a value of 0 makes
> no sense and should still report the maximum allowed value, so the getter code
> is unrolled for the POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT case.

This is probably not the right way to do it.

The sysfs ABI docs say that some chargers implement a writable "status" sysfs
property to allow disabling the charger [1]. IMO this is the proper place to
enable/disable the charger. POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT only
refers to the "constant current" portion of the charge cycle, and should not
be used to implement full control of the charger.


Regards
ChenYu

[1] https://elixir.bootlin.com/linux/latest/source/Documentation/ABI/testing/sysfs-class-power#L444

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ