From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDD65C433EF for ; Mon, 18 Jun 2018 09:14:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8DC25208E0 for ; Mon, 18 Jun 2018 09:14:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DC25208E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966893AbeFRJO2 (ORCPT ); Mon, 18 Jun 2018 05:14:28 -0400 Received: from muru.com ([72.249.23.125]:47664 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966715AbeFRI3C (ORCPT ); Mon, 18 Jun 2018 04:29:02 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 227968081; Mon, 18 Jun 2018 08:31:42 +0000 (UTC) Date: Mon, 18 Jun 2018 01:28:58 -0700 From: Tony Lindgren To: Pavel Machek Cc: kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org Subject: Re: Charge counter on droid 4 Message-ID: <20180618082858.GO112168@atomide.com> References: <20180615080014.GA29192@amd> <20180615083156.GA32102@amd> <20180618065827.GN112168@atomide.com> <20180618074023.GA16955@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180618074023.GA16955@amd> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Pavel Machek [180618 07:43]: > > So... there are mA, mAh values. Those come from hardware, and I > believe we should keep them. > > But there are also mW, mWh values, which are synthetic. Userland can > compute them from mV, mA values... and it is confusing that kernel > provides them. (My tendency was to start computing these synthetic > values in userland, to compare them with "real hardware" values from > kernel. But then I looked at kernel implementation, and realized they > are synthetic, tooo...) Hmm mWh value is based on the hardware sampled shunt values and number of samples gathered between the two readings. I'd rather call the calculated values based on userland reading mV and mA values "synthetic" :) Regards, Tony