Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1663750pxa; Sun, 23 Aug 2020 11:26:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzMhtSg4jrif4TSjyECsJdoh2cwsqj7DjGjwtagqRO+P25QCsIZ0C9Tv5NMq+fLCQ1qtOr X-Received: by 2002:a17:906:37d3:: with SMTP id o19mr2296302ejc.62.1598207185169; Sun, 23 Aug 2020 11:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598207185; cv=none; d=google.com; s=arc-20160816; b=NNT9J7NCnwTPTkWpd+jmQ4aB5tVsV7RQM4q/qCinp5F3Sr6ACWCLixMQbswfgalda1 oo69eF2jMJGOus7qIcV5YZNIxa3W75aoP0D5TeATIbPR/47CxdzNpggXy7XPWwtqU/eM in+jhEpVATaNAFBq7LzWoAC4SQVuzrGLOKKrkZpypwTW4tuKA5dC5KlsKVJUl3Eau3ka x5RyBNWFgAFD72mk0b6REtN7Q/GDqkr0n7KOS4OHGSgxv6z9kOUa6GteVnfT88XV/Rij VlydpXkb4uIpug9QB+B2OTn/4SF1JjbcDMFqUC491BmlEHoQmzMaTupk34fm6Ir7FDti x3/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=rCWEOdgqD06SKSz8arXJ97KpUQKu+86gzZBwPhlJr3k=; b=m+up0xmxHcAtuB4NvmIjx+iv66dJdlSHtUX9+qU0uOLiAADnCiLU2fQNb4Qq0HDHI7 dM1JjxdBFE2U34B2KB3ySkADeQzJcRwi3FP/SK9qYfNCokQj13LE+PlQ/3X5N7iw9JHv 7E37a8NNEf07U3Chn//4MgdpHX1v18PObuohJu/VpweJNbbrxn6NF1xjs3ZWEg5qGEyi VYoOPYB7Z6LuPsG/46rFl+0pICBEv2X7daPFKgQVc5n4Tn+DZVRcqWgoVZv8eQOAXpNF v9psYi9b05slINNC8QAalV2rSFHzO0Yy4EgQTL92n7cDSzKH/kkietrtIZ7GFe7jMiE8 JfHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r8si5401352ejr.677.2020.08.23.11.26.02; Sun, 23 Aug 2020 11:26:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727982AbgHWSAx (ORCPT + 99 others); Sun, 23 Aug 2020 14:00:53 -0400 Received: from mail.v3.sk ([167.172.186.51]:42328 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727945AbgHWSAu (ORCPT ); Sun, 23 Aug 2020 14:00:50 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3E84CDF106; Sun, 23 Aug 2020 17:59:46 +0000 (UTC) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id uzF78zdjqwmD; Sun, 23 Aug 2020 17:59:45 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 759FDDFA6B; Sun, 23 Aug 2020 17:59:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uf-79zAqGnZt; Sun, 23 Aug 2020 17:59:44 +0000 (UTC) Received: from localhost (unknown [109.183.109.54]) by zimbra.v3.sk (Postfix) with ESMTPSA id DC182DF106; Sun, 23 Aug 2020 17:59:43 +0000 (UTC) Date: Sun, 23 Aug 2020 20:00:41 +0200 From: Lubomir Rintel To: Dmitry Osipenko Cc: Lee Jones , Rob Herring , Thierry Reding , Jonathan Hunter , Pavel Machek , Dan Murphy , Sebastian Reichel , devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 5/6] dt-bindings: mfd: ene-kb3930: Document power-supplies and monitored-battery properties Message-ID: <20200823180041.GB209852@demiurge.local> References: <20200823140846.19299-1-digetx@gmail.com> <20200823140846.19299-6-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200823140846.19299-6-digetx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, Aug 23, 2020 at 05:08:45PM +0300, Dmitry Osipenko wrote: > Battery could be connected to the controller and in this case controller > will provide a battery-monitor function. > > The power-supplies phandle property is needed in order to describe the > power supply which is used for charging of the battery, this allows to > determine whither battery is charging or discharging, depending on the > supply state. > > The monitored-battery phandle provides information about the battery cell > characteristics. I believe it would be better if you created a new binding document instead of reusing this one -- the hardware part iseems to be a different one and the firmware it runs seems to be behaving totally differently than the usual ENE firmware [1]. [1] This eneec.c seems to be coming from ENE, so I'm assuming it's a good enough description of how their firmware behaves: https://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp3-dell-ariel.git/tree/drivers/input/serio/eneec.c Cheers Lubo > Signed-off-by: Dmitry Osipenko > --- > .../devicetree/bindings/mfd/ene-kb3930.yaml | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mfd/ene-kb3930.yaml b/Documentation/devicetree/bindings/mfd/ene-kb3930.yaml > index 5a1c4a959d9c..435728054f3a 100644 > --- a/Documentation/devicetree/bindings/mfd/ene-kb3930.yaml > +++ b/Documentation/devicetree/bindings/mfd/ene-kb3930.yaml > @@ -29,6 +29,8 @@ properties: > description: GPIO used with the shutdown protocol on Ariel > maxItems: 2 > > + monitored-battery: true > + power-supplies: true > system-power-controller: true > > required: > @@ -41,6 +43,19 @@ examples: > - | > #include > > + battery: battery-cell { > + compatible = "simple-battery"; > + charge-full-design-microamp-hours = <3260000>; > + energy-full-design-microwatt-hours = <24000000>; > + operating-range-celsius = <0 40>; > + }; > + > + mains: ac-adapter { > + compatible = "gpio-charger"; > + charger-type = "mains"; > + gpios = <&gpio 125 GPIO_ACTIVE_LOW>; > + }; > + > i2c { > #address-cells = <1>; > #size-cells = <0>; > @@ -52,6 +67,9 @@ examples: > > off-gpios = <&gpio 126 GPIO_ACTIVE_HIGH>, > <&gpio 127 GPIO_ACTIVE_HIGH>; > + > + monitored-battery = <&battery>; > + power-supplies = <&mains>; > }; > }; > > -- > 2.27.0 >