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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70C9EC433EF for ; Mon, 15 Nov 2021 20:53:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51D5D619E8 for ; Mon, 15 Nov 2021 20:53:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353067AbhKOUyX (ORCPT ); Mon, 15 Nov 2021 15:54:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:50074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239432AbhKOSHo (ORCPT ); Mon, 15 Nov 2021 13:07:44 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 334B163316; Mon, 15 Nov 2021 17:45:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1636998328; bh=hI+1b2RSlrUmiEH5w1TT/EiHcYbHXU8DUzQOva243LE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fYFHuBVZR6VLee3wOZoq674TTxRy3ZW3xy8dA4l4S6Y+ZA8l3rYRsIw4rnKakDDEn 8d8c6wtWmpJ4lx4RXpJVj9NcDF1svzGqhAuZG13S54sMc4cd0A/8wx4ZlK+HOU9DZa d29i9az6Ru/17qrw07xJtyT4qNVYCQ2PRHlXNeKA= 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=205=2E10=20427/575=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: Mon, 15 Nov 2021 18:02:32 +0100 Message-Id: <20211115165358.549511983@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211115165343.579890274@linuxfoundation.org> References: <20211115165343.579890274@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 9ad0afe83d1b7..7a23c70f48791 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