From patchwork Mon Oct 22 07:43:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10651833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E19F1508 for ; Mon, 22 Oct 2018 07:44:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81A40286D1 for ; Mon, 22 Oct 2018 07:44:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7573A28829; Mon, 22 Oct 2018 07:44:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1126D286D5 for ; Mon, 22 Oct 2018 07:44:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727742AbeJVQBv (ORCPT ); Mon, 22 Oct 2018 12:01:51 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46617 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727559AbeJVQBv (ORCPT ); Mon, 22 Oct 2018 12:01:51 -0400 Received: by mail-pf1-f194.google.com with SMTP id r64-v6so19470454pfb.13 for ; Mon, 22 Oct 2018 00:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=HxdXYZYCNB4J2ZC97d1xBOZ7FLXQWXjI38HmOhTVoSw=; b=aAalhCiNgB6Ioh/26yzv9I2bf+ho9BQ0HndWKi9+/y6mH4s5S3mgWxyPWC8/XR41pH Fpr/gDjLzNtBOtaNha6DaWAucPNzAV4TsgmJfJ/A8rcpgTBoCNDkCLVdV1IMxwuducJE LTk6UH4tZiIYYFVkBXeinvoKn54TUnb4o+trU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HxdXYZYCNB4J2ZC97d1xBOZ7FLXQWXjI38HmOhTVoSw=; b=MkKkvzI4ndvwkVEEszDZcFkI3LJ6I1n0/Utv+5iDemauEhVqODwaaT5uzbGXMS0Go0 4ujQsDmcimHqfNNC3bp/LNNV/WpcynIiJyDiFnlVXqC4JHVmL/fMoP/d7OgoWpZ7YSWx eMtoSLey+VDWzuWtegbCsRFNNfI9rTwMemMBvKGJekCIwAncSHqcKT8Vf5a38FEBnWLU V4mmNswG6oBZDX4FG4vtKJaadreJMM1RGt2GAMqcKz4X33qLgYyZofQAM9Cg/2fjW11M 2E/FUde4/+nJJ+3pnAb1GI8VUm2AEMphlCnNdsjxVIuQ3FEyIaiEvJQv608Ph4IEkQrK /yUA== X-Gm-Message-State: ABuFfoiPx/RiPPLtERCtFzwiiee+QjpFuGC71tDUm1lH8fGWVyBteJVl /d0t2XYDfuqsOMDhmO/pN2xXXw== X-Google-Smtp-Source: ACcGV61qQwccnnYBuF93ETCBSHjAyephXYMAmNCo/bb2TElmQ+ioPw2WzIQ6XYXRkaMNChB3wGxdKQ== X-Received: by 2002:a62:f909:: with SMTP id o9-v6mr44870245pfh.160.1540194268355; Mon, 22 Oct 2018 00:44:28 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id d186-v6sm43704253pfg.173.2018.10.22.00.44.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Oct 2018 00:44:27 -0700 (PDT) From: Baolin Wang To: sre@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, yuanjiang.yu@unisoc.com, baolin.wang@linaro.org, broonie@kernel.org, ctatlor97@gmail.com, linus.walleij@linaro.org Subject: [PATCH v6 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance Date: Mon, 22 Oct 2018 15:43:57 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The internal resistance of a battery is not a constant in its life cycle, this varies over the age of the battery or temperature and so on. But we just want use one constant battery internal resistance to estimate the battery capacity. Thus this patch introduces one property to present the battery factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v5: - None. Changes from v4: - None. Changes from v3: - Split binding into one separate patch. - Add LinusW reviewed tag. Changes from v2: - Rename the property. - Improve the commit message. Changes from v1: - New patch in v2. --- .../devicetree/bindings/power/supply/battery.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt index f4d3b4a..938d027 100644 --- a/Documentation/devicetree/bindings/power/supply/battery.txt +++ b/Documentation/devicetree/bindings/power/supply/battery.txt @@ -22,6 +22,7 @@ Optional Properties: - charge-term-current-microamp: current for charge termination phase - constant-charge-current-max-microamp: maximum constant input current - constant-charge-voltage-max-microvolt: maximum constant input voltage + - factory-internal-resistance-micro-ohms: battery factory internal resistance Battery properties are named, where possible, for the corresponding elements in enum power_supply_property, defined in @@ -42,6 +43,7 @@ Example: charge-term-current-microamp = <128000>; constant-charge-current-max-microamp = <900000>; constant-charge-voltage-max-microvolt = <4200000>; + factory-internal-resistance-micro-ohms = <250000>; }; charger: charger@11 {