[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <sbzgrm2zplaqaxr7ll4t2xbxzorgh5swuonqyqvwsnrfum7565@luiffklagamp>
Date: Thu, 19 Dec 2024 00:23:51 +0100
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Bhavin Sharma <bhavin.sharma@...iconsignals.io>
Cc: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v11 2/2] power: supply: Add STC3117 fuel gauge unit driver
Hi,
On Mon, Dec 16, 2024 at 12:34:55PM +0530, Bhavin Sharma wrote:
> Adds initial support for the STC3117 fuel gauge.
>
> The driver provides functionality to monitor key parameters including:
> - Voltage
> - Current
> - State of Charge (SOC)
> - Temperature
> - Status
>
> Co-developed-by: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>
This is not what I wrote. Please check the process documentation, which
I already referenced in my comment in your v9 submission. Apart from
that my comment also applies to the other patch in this series.
> Signed-off-by: Bhavin Sharma <bhavin.sharma@...iconsignals.io>
> ---
> MAINTAINERS | 8 +
> drivers/power/supply/Kconfig | 7 +
> drivers/power/supply/Makefile | 1 +
> drivers/power/supply/stc3117_fuel_gauge.c | 607 ++++++++++++++++++++++
> 4 files changed, 623 insertions(+)
> create mode 100644 drivers/power/supply/stc3117_fuel_gauge.c
[...]
> + if (ram_data.reg.state != STC3117_RUNNING) {
> + data->batt_current = -ENODATA;
> + data->temp = -ENODATA;
> + } else {
> + if (data->voltage < APP_CUTOFF_VOLTAGE)
> + data->soc = -ENODATA;
> +
> + if (mode & STC3117_VMODE) {
> + data->avg_current = -ENODATA;
> + data->batt_current = -ENODATA;
> + }
> + }
You multiply these with 1000 (10 for temp) before returning them to
userspace. So you return (-ENODATA * 1000), which is obviously
wrong...
Greetings,
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists