Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp465029imm; Wed, 26 Sep 2018 01:31:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV62WTowX9BJcCgvOrlB9m6B4qRE40QrhK35JOWIh4WzBYY7cP4dIUKIZ41rQcHpRZBW+LP55 X-Received: by 2002:a63:6849:: with SMTP id d70-v6mr4579163pgc.7.1537950671915; Wed, 26 Sep 2018 01:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537950671; cv=none; d=google.com; s=arc-20160816; b=I+SH6vW9g/x8D4pHWHqa/wygWLL79mECeuNNtLOT5G9cAa7Mo6sAV41CDs242CbPOy e3ZfmS5VdUfbOBBZYv02IODw+BcTVyF/Q04d8fl66Wjlob7AjdKW9fAzOIoWaSGhg9OX uewfxVaaqKefVr0Ih+Uph1WpNNZWDaE/YbWLMyDAqxsk9ufbk06KA9PGhjcX2hbTTxeN LV2hdubNJRGktuTp/A5rdWFpolHd37bPGGvwjxVx5XGE9QzHhmCpggCi32OHV9nZ4hBX oQ/DJMK2Vm2KSsXdpuwa9zVjYgLiIPdm656tZ2JQ4abPgoERCvi7Fm7w7lmDEoVhyB9q zuuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=YPhaSuwgZIE6YSc6e7klVWPuc99XZubi/sRtM7ioCts=; b=mbsB4WgHtvXEAUHVYyxDf7XdtGaN+wvkjKDy/IUSpvh3iugSdh3Mve3km7AmpFnhIJ A9lJjQdWfCf3SKTId3q7biWosU7xadwM82bUTlN2bmWLhJR3jgS7B/G/ucC/5qPuz1xo WkP4YE7uzSm5Rpci86vs8ZDFsy9wxP2PA9YLTGsKioo+YxT/Szt/5rJL2ezh2V14mYK2 Ny2rTqhaZ1mzvqgrc7+ShXwMZwDKBXi/bYXrkuAgK10OzKZqGc9z4ntMb59yRIE7rGq4 dBYsUEdz9E08ggDnwuGbik4cCk/HKl+013pgWLBQg0C3Y+t+nH14RmTpp0+jT1hNMDBY kmMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hThJcxqb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12-v6si4732832plc.332.2018.09.26.01.30.56; Wed, 26 Sep 2018 01:31:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hThJcxqb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727273AbeIZOm2 (ORCPT + 99 others); Wed, 26 Sep 2018 10:42:28 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37860 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbeIZOm2 (ORCPT ); Wed, 26 Sep 2018 10:42:28 -0400 Received: by mail-lf1-f68.google.com with SMTP id a82-v6so7086095lfa.4 for ; Wed, 26 Sep 2018 01:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YPhaSuwgZIE6YSc6e7klVWPuc99XZubi/sRtM7ioCts=; b=hThJcxqbQu3AdSYpU2fhUYHFcYXj9fYgeyAV6P+cgvcpOwbyAm2JnQW2/p1oYS0RxX uDVTwNgmoMEkJ9wTxgg3ezt597jAVYH+6/xJX/9cAt1pRHR3DXcOrAmsg2G3dX9L0JHu cTfmFTqhDfgOKgq+eYig1EzqzeGPu+gZsRai4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YPhaSuwgZIE6YSc6e7klVWPuc99XZubi/sRtM7ioCts=; b=ZsKECJS8Rxi9FMWP5aCVXU2cSRsaLo+cF/g/mOiRZfQ9RnqrXBydVweJCN+14idwZl OvONBlJ4stOQ+o35x+o4DZG1GXGdQAHZOUhDVzBNZEGLnQFBHdelDzuzVvKmw2xk+qqI C3Im7gOOPcdCylV+RuLkriBzwXZb+s1lNx+1rHJ9MMukCut2tAUxAGtwNhhZjB8rpyp6 3hGvoHndzhb02NeC33RTtwXMDhYqswANrOwTBKEyFVLF8wbOiyfrZ51ojtJA2OAlIog0 dHHehSvyfHKmgj2t+ib4rwMDDh3alrl4y2J8b9pTbWvZGNHSbUdIyU3Bif0OuqhcUbNd uLbQ== X-Gm-Message-State: ABuFfojm37l7vINmpnO4KUcmIw1W2izHNzchozukumTxAWiJj53lXH47 dnWzHM8zmeavp7v3RP9xO2KtQ5Mfr0wTVwfVfiKfug== X-Received: by 2002:a19:d189:: with SMTP id i131-v6mr3354027lfg.20.1537950639767; Wed, 26 Sep 2018 01:30:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:95d7:0:0:0:0:0 with HTTP; Wed, 26 Sep 2018 01:30:39 -0700 (PDT) In-Reply-To: References: <358665e3f4f9ec105dc2f8a2dc6dd98dbe761fae.1537930252.git.baolin.wang@linaro.org> From: Baolin Wang Date: Wed, 26 Sep 2018 16:30:39 +0800 Message-ID: Subject: Re: [PATCH v2 1/4] power: supply: core: Introduce one property to present the battery internal resistance To: Linus Walleij Cc: Sebastian Reichel , Rob Herring , Mark Rutland , Linux PM list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , yuanjiang.yu@unisoc.com, Mark Brown , Craig Tatlor Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On 26 September 2018 at 16:00, Linus Walleij wrote: > On Wed, Sep 26, 2018 at 4:59 AM Baolin Wang wrote: > >> Introduce one property to present the battery internal resistance for battery >> information. >> >> Signed-off-by: Baolin Wang >> --- >> Changes from v1: >> - New patch in v2. > > I'm a bit confused by the physics in this patch. > > The internal resistance of a battery is not a constant in its life cycle, > this varies over the age of the battery, and the reason I thing is > chemical residuals accumulating on the anode and cathode inside > the battery and the energy storage medium aging. (Plus/minus my > ignorance about how batteries actually work.) Yes, you are right. The internal resistance can be affected by temperature or battery age or other factors. But our solution just uses one constant internal resistance to calculate OCV value to look up the capacity table when system boots on, in this case we do not need one more accuracy OCV, since we will calculate the battery capacity in future. So we just introduce one estimation constant internal resistance. > > AFAIK the fact that the internal resistance varies is of high > importance for people developing algorithms of battery capacity > and longevity. Such that some (hardware) capacity monitors go > to great lengths to measure with high precision the current > internal resistance of the battery for their algorithms. > > Sorry for making things more complex, but should it be named > "factory-internal-resistance-micro-ohms" or > "typical-internal-resistance-micro-ohms"? I am fine with this change. If Sebastian also agree with this change, I will fix. Thanks for your reviewing and comments. -- Baolin Wang Best Regards