]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
power: supply: rt5033_battery: Change voltage values to µV
authorJakob Hauser <jahau@rocketmail.com>
Fri, 8 Oct 2021 08:32:45 +0000 (10:32 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 12 Oct 2021 15:12:23 +0000 (17:12 +0200)
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>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/rt5033_battery.c

index 9ad0afe83d1b785838b79a3eed293ecb613cb2be..7a23c70f48791b119048d3c76f358ce12f3edc4f 100644 (file)
@@ -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;
 }