From patchwork Mon Nov 5 07:39:06 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: 10667509 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 7B3731751 for ; Mon, 5 Nov 2018 07:39:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68439295A8 for ; Mon, 5 Nov 2018 07:39:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5ADD1295D8; Mon, 5 Nov 2018 07:39:32 +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 F3728295A8 for ; Mon, 5 Nov 2018 07:39:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729568AbeKEQ5u (ORCPT ); Mon, 5 Nov 2018 11:57:50 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40448 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729000AbeKEQ5u (ORCPT ); Mon, 5 Nov 2018 11:57:50 -0500 Received: by mail-pl1-f196.google.com with SMTP id q19-v6so1034769pll.7 for ; Sun, 04 Nov 2018 23:39:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=7+KsQAiIFIxoDmz5EswpwgvRJ2yLAWBeV0S1HKrrYFA=; b=SvqvZyO7B1AF6b9TeCGIzx2VB+ajoHGmW9zoX5HpAJPVxATmn2JLN2W/tYH7qKzExA vlR6CQwotJLPR/SZcr0LHzSnak9H58TGTlqJl5lZKZPeoYQV0Q8oEDurYTfUKN5FniIH aXMKcrtluvcvI5cNn1GeNKK/uyqLipvhpsk0A= 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=7+KsQAiIFIxoDmz5EswpwgvRJ2yLAWBeV0S1HKrrYFA=; b=S2XcWRCs2SsD1nkog2synjk8cvWNVLSEah35aQGyGFMgR8izhTiQRquyj2TtEbeoOR ekOvbaaCfr3IY8PYOwMfBa1FGvwX9EJl7TaFSSMTQjJGQkc1KzJWU+HTYUOMwe3c9cJS MiqmlblhrvDsFb66KIhpUc7C/hRXS5pM7N1QfE+MTwHaktBoMoI7PTfUk8nXCkrOvNSO lKlK6mSKA4U6BGm185zb16Pv9oPU4D5mtUdRSU1ESQEPfLjmwQwELnSEnHW/hbRxbREi aGgh7fKf+5T4Xce9SibG9/d7RzLteKvsOcq5npcuqE7Ay8CjIxWPR9tUuLdQXc+25zgN 6r4Q== X-Gm-Message-State: AGRZ1gIv3CO/WZd8j9xnQ85RRw6I8WvA9QQr2fkd0ucHvXegyUuh2+jH Zzug9Hew1+H+xocLKYFbGEPFRw== X-Google-Smtp-Source: AJdET5cjZKxUmRmUO/gdfCN64iASfiI3XiQUKX9hhRf37PVclw4pDcKO7v6LcAdHecbLwrrEuRet3w== X-Received: by 2002:a17:902:544:: with SMTP id 62-v6mr20148145plf.73.1541403570279; Sun, 04 Nov 2018 23:39:30 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id d5-v6sm27632040pfo.131.2018.11.04.23.39.25 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Nov 2018 23:39:29 -0800 (PST) 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, quentin.schulz@bootlin.com Subject: [PATCH v7 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance Date: Mon, 5 Nov 2018 15:39:06 +0800 Message-Id: <5640f29e0b7f46f9ee77d80745f8c93eda355c34.1541393063.git.baolin.wang@linaro.org> 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 v6: - None. 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 {