]> asedeno.scripts.mit.edu Git - linux.git/commit
power: supply: cpcap-battery: Simplify short term power average calculation
authorTony Lindgren <tony@atomide.com>
Wed, 9 Oct 2019 21:06:19 +0000 (14:06 -0700)
committerSebastian Reichel <sre@kernel.org>
Sun, 20 Oct 2019 18:33:39 +0000 (20:33 +0200)
commitac437c1c8438027d08f115445e5963397c04ce5b
treeb7a4f89bd48f1b135db15539bbb5fd82904a322a
parentc59b3bad6fd83a42c73ec6ef6609af4882dfbcb3
power: supply: cpcap-battery: Simplify short term power average calculation

We can use sign_extend32() here to simplify things. And let's fix the
comment for CCM register, that contains the calibration offset.

Cc: Merlijn Wajer <merlijn@wizzup.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cpcap-battery.c