Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43AA2C433EF for ; Wed, 24 Nov 2021 12:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245330AbhKXMZY (ORCPT ); Wed, 24 Nov 2021 07:25:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:36036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243992AbhKXMWT (ORCPT ); Wed, 24 Nov 2021 07:22:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8EACE611C3; Wed, 24 Nov 2021 12:13:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637756001; bh=uTUEgtGmdnuDM44r+Dbj6sUNCh0HtYOfDpYvHUjqdho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2qsTEqpFy8o/fFxSrNAVHjNywyjY0poZ5TOXwpvGkWDLPZaQeoubPHE1AqO2mXCbz sNjgsBiRod2u00ApBy38AUCX1N6XKuMgmsZvgplPYh8z1gznGhlyvahA44ZpiMYRec envm7beSZBCG6KRMQDYtWtxq8WYiPNyaHEMqqPWo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Beomho Seo , Chanwoo Choi , Jakob Hauser , Sebastian Reichel , Sasha Levin Subject: =?UTF-8?q?=5BPATCH=204=2E9=20126/207=5D=20=3D=3FUTF-8=3Fq=3Fpower=3A=3D20supply=3A=3D20rt5033=3D5Fbattery=3A=3D20Change=3D20voltage=3F=3D=20=3D=3FUTF-8=3Fq=3F=3D20values=3D20to=3D20=3DC2=3DB5V=3F=3D?= Date: Wed, 24 Nov 2021 12:56:37 +0100 Message-Id: <20211124115708.130493509@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115703.941380739@linuxfoundation.org> References: <20211124115703.941380739@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakob Hauser [ Upstream commit bf895295e9a73411889816f1a0c1f4f1a2d9c678 ] 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 Cc: Chanwoo Choi Signed-off-by: Jakob Hauser Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- 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 9310b85f3405e..7eec7014086d8 100644 --- a/drivers/power/supply/rt5033_battery.c +++ b/drivers/power/supply/rt5033_battery.c @@ -63,7 +63,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