From: Krzysztof Kozlowski <krzk@kernel.org>
To: Artur Weber <aweber.kernel@gmail.com>,
Hans de Goede <hdegoede@redhat.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>,
Purism Kernel Team <kernel@puri.sm>,
Sebastian Reichel <sre@kernel.org>,
Anton Vorontsov <anton.vorontsov@linaro.org>,
Ramakrishna Pallala <ramakrishna.pallala@intel.com>,
Dirk Brandewie <dirk.brandewie@gmail.com>
Cc: Henrik Grimler <henrik@grimler.se>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH] power: supply: max17042_battery: Fix SOC threshold calc w/ no current sense
Date: Sun, 18 Aug 2024 08:39:20 +0200 [thread overview]
Message-ID: <4289e248-842a-4883-8c71-bd2fcbeecae1@kernel.org> (raw)
In-Reply-To: <20240817-max17042-soc-threshold-fix-v1-1-72b45899c3cc@gmail.com>
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@gmail.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-08-18 6:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-17 10:51 [PATCH] power: supply: max17042_battery: Fix SOC threshold calc w/ no current sense Artur Weber
2024-08-17 18:51 ` Henrik Grimler
2024-08-18 6:39 ` Krzysztof Kozlowski [this message]
2024-08-27 16:58 ` Sebastian Reichel
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=4289e248-842a-4883-8c71-bd2fcbeecae1@kernel.org \
--to=krzk@kernel.org \
--cc=anton.vorontsov@linaro.org \
--cc=aweber.kernel@gmail.com \
--cc=dirk.brandewie@gmail.com \
--cc=hdegoede@redhat.com \
--cc=henrik@grimler.se \
--cc=kernel@puri.sm \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=ramakrishna.pallala@intel.com \
--cc=sebastian.krzyszkowiak@puri.sm \
--cc=sre@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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