* [PATCH] power: supply: rt5033_battery: Change voltage values to µV
[not found] <20211008083245.2884-1-jahau.ref@rocketmail.com>
@ 2021-10-08 8:32 ` Jakob Hauser
2021-10-12 15:32 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Jakob Hauser @ 2021-10-08 8:32 UTC (permalink / raw)
To: Sebastian Reichel
Cc: linux-pm, ~postmarketos/upstreaming, Beomho Seo, Chanwoo Choi,
Jakob Hauser
Currently the rt5033_battery driver provides voltage values in mV. It
should be µV as stated in Documentation/power/power_supply_class.rst.
Fixes: b847dd96e659 ("power: rt5033_battery: Add RT5033 Fuel gauge device driver")
Cc: Beomho Seo <beomho.seo@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Jakob Hauser <jahau@rocketmail.com>
---
drivers/power/supply/rt5033_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/rt5033_battery.c b/drivers/power/supply/rt5033_battery.c
index 9ad0afe83d1b..7a23c70f4879 100644
--- a/drivers/power/supply/rt5033_battery.c
+++ b/drivers/power/supply/rt5033_battery.c
@@ -60,7 +60,7 @@ static int rt5033_battery_get_watt_prop(struct i2c_client *client,
regmap_read(battery->regmap, regh, &msb);
regmap_read(battery->regmap, regl, &lsb);
- ret = ((msb << 4) + (lsb >> 4)) * 1250 / 1000;
+ ret = ((msb << 4) + (lsb >> 4)) * 1250;
return ret;
}
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] power: supply: rt5033_battery: Change voltage values to µV
2021-10-08 8:32 ` [PATCH] power: supply: rt5033_battery: Change voltage values to µV Jakob Hauser
@ 2021-10-12 15:32 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2021-10-12 15:32 UTC (permalink / raw)
To: Jakob Hauser
Cc: linux-pm, ~postmarketos/upstreaming, Beomho Seo, Chanwoo Choi
[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]
Hi,
On Fri, Oct 08, 2021 at 10:32:45AM +0200, Jakob Hauser wrote:
> Currently the rt5033_battery driver provides voltage values in mV. It
> should be µV as stated in Documentation/power/power_supply_class.rst.
>
> Fixes: b847dd96e659 ("power: rt5033_battery: Add RT5033 Fuel gauge device driver")
> Cc: Beomho Seo <beomho.seo@samsung.com>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Signed-off-by: Jakob Hauser <jahau@rocketmail.com>
> ---
> drivers/power/supply/rt5033_battery.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/rt5033_battery.c b/drivers/power/supply/rt5033_battery.c
> index 9ad0afe83d1b..7a23c70f4879 100644
> --- a/drivers/power/supply/rt5033_battery.c
> +++ b/drivers/power/supply/rt5033_battery.c
> @@ -60,7 +60,7 @@ static int rt5033_battery_get_watt_prop(struct i2c_client *client,
> regmap_read(battery->regmap, regh, &msb);
> regmap_read(battery->regmap, regl, &lsb);
>
> - ret = ((msb << 4) + (lsb >> 4)) * 1250 / 1000;
> + ret = ((msb << 4) + (lsb >> 4)) * 1250;
>
> return ret;
> }
Thanks, queued.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-12 15:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20211008083245.2884-1-jahau.ref@rocketmail.com>
2021-10-08 8:32 ` [PATCH] power: supply: rt5033_battery: Change voltage values to µV Jakob Hauser
2021-10-12 15:32 ` Sebastian Reichel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.