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]
Message-ID: <4289e248-842a-4883-8c71-bd2fcbeecae1@kernel.org>
Date: Sun, 18 Aug 2024 08:39:20 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Artur Weber <aweber.kernel@...il.com>, Hans de Goede
 <hdegoede@...hat.com>, Marek Szyprowski <m.szyprowski@...sung.com>,
 Sebastian Krzyszkowiak <sebastian.krzyszkowiak@...i.sm>,
 Purism Kernel Team <kernel@...i.sm>, Sebastian Reichel <sre@...nel.org>,
 Anton Vorontsov <anton.vorontsov@...aro.org>,
 Ramakrishna Pallala <ramakrishna.pallala@...el.com>,
 Dirk Brandewie <dirk.brandewie@...il.com>
Cc: Henrik Grimler <henrik@...mler.se>, linux-pm@...r.kernel.org,
 linux-kernel@...r.kernel.org, ~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH] power: supply: max17042_battery: Fix SOC threshold calc
 w/ no current sense

On 17/08/2024 12:51, Artur Weber wrote:
> Commit 223a3b82834f ("power: supply: max17042_battery: use VFSOC for
> capacity when no rsns") made it so that capacity on systems without
> current sensing would be read from VFSOC instead of RepSOC. However,
> the SOC threshold calculation still read RepSOC to get the SOC
> regardless of the current sensing option state.
> 
> Fix this by applying the same conditional to determine which register
> should be read.
> 
> This also seems to be the intended behavior as per the datasheet - SOC
> alert config value in MiscCFG on setups without current sensing is set
> to a value of 0b11, indicating SOC alerts being generated based on
> VFSOC, instead of 0b00 which indicates SOC alerts being generated based
> on RepSOC.
> 
> This fixes an issue on the Galaxy S3/Midas boards, where the alert
> interrupt would be constantly retriggered, causing high CPU usage
> on idle (around ~12%-15%).
> 
> Fixes: e5f3872d2044 ("max17042: Add support for signalling change in SOC")
> Signed-off-by: Artur Weber <aweber.kernel@...il.com>

Cc: <stable@...r.kernel.org>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ