Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) by mail-b.sr.ht (Postfix) with ESMTPS id 6EAB7FF0E9 for <~postmarketos/upstreaming@lists.sr.ht>; Mon, 13 Jul 2020 19:03:12 +0000 (UTC) Received: by mail-il1-f195.google.com with SMTP id s21so12133075ilk.5 for <~postmarketos/upstreaming@lists.sr.ht>; Mon, 13 Jul 2020 12:03:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=l5rWVgnnCloHt41CFPCxRV5qmnmySbxOsQcq4blbDZU=; b=Fe+T40iyNhv4J+m/gIEjrPTCGexHfhtUdBkuphoo+k1YxnLlbUKGSk4ofKp5IxyNrr yNncSOFvJ5ef5wPZIVFPrSSaOPyLl/jwISD7eqD/wT2WmtnWTVWoAVWqJRamnixCARFA /kc1Q7LLc2qTs8lA2emjzDqDCo/L6c9KCtO4M0LtJcmU9Cn5AzrGb+TSbIGLETEZyQTm SYojaDWvfqbWucbFgAie/xKipx2t5p9Jm3lmKVitdnyDHbFIt6yXXRoGofWJox1nYtF1 blcswLzd/gelwXJNZobGpesLAoMmYqcGRhh/CE6yOP4UqJXV19Qt8XoRg38+fvEcRGUL 7Z5w== X-Gm-Message-State: AOAM5317iXOMvC5fVxwiif6XZEAGeP7xMUuCgrtEK/64Ts7OLbwOKCd2 mIUtcE/edKImElHJiYUmhg== X-Google-Smtp-Source: ABdhPJyFU3OO/ANkI1WfClMonQPuMZQFkzhvvt9yHjYL0J26xn464hZPF3poCvPXO+hMPxbus5uE0g== X-Received: by 2002:a92:6a02:: with SMTP id f2mr1110656ilc.68.1594666991695; Mon, 13 Jul 2020 12:03:11 -0700 (PDT) Received: from xps15 ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id x12sm1175218iov.43.2020.07.13.12.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 12:03:10 -0700 (PDT) Received: (nullmailer pid 547640 invoked by uid 1000); Mon, 13 Jul 2020 19:03:10 -0000 Date: Mon, 13 Jul 2020 13:03:10 -0600 From: Rob Herring To: Iskren Chernev Cc: Sebastian Reichel , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jonathan Bakker , Vladimir Barinov Subject: Re: [PATCH v3 2/6] dt-bindings: power: supply: Extend max17040 compatibility Message-ID: <20200713190310.GA546410@bogus> References: <20200624155633.3557401-1-iskren.chernev@gmail.com> <20200624155633.3557401-3-iskren.chernev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200624155633.3557401-3-iskren.chernev@gmail.com> On Wed, Jun 24, 2020 at 06:56:29PM +0300, Iskren Chernev wrote: > Maxim max17040 is a fuel gauge from a larger family utilising the Model > Gauge technology. Document all different compatible strings that the > max17040 driver recognizes. > > Some devices in the wild report double the capacity. The > maxim,double-soc (from State-Of-Charge) property fixes that. > > Signed-off-by: Iskren Chernev > --- > .../bindings/power/supply/max17040_battery.txt | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/power/supply/max17040_battery.txt b/Documentation/devicetree/bindings/power/supply/max17040_battery.txt > index 4e0186b8380fa..554bce82a08e6 100644 > --- a/Documentation/devicetree/bindings/power/supply/max17040_battery.txt > +++ b/Documentation/devicetree/bindings/power/supply/max17040_battery.txt > @@ -2,7 +2,9 @@ max17040_battery > ~~~~~~~~~~~~~~~~ > > Required properties : > - - compatible : "maxim,max17040" or "maxim,max77836-battery" > + - compatible : "maxim,max17040", "maxim,max17041", "maxim,max17043", > + "maxim,max17044", "maxim,max17048", "maxim,max17049", > + "maxim,max17058", "maxim,max17059" or "maxim,max77836-battery" > - reg: i2c slave address > > Optional properties : > @@ -11,6 +13,10 @@ Optional properties : > generated. Can be configured from 1 up to 32 > (%). If skipped the power up default value of > 4 (%) will be used. > +- maxim,double-soc : Certain devices return double the capacity. > + Specify this boolean property to divide the > + reported value in 2 and thus normalize it. > + SOC == State of Charge == Capacity. This can't be implied by the compatible string? > - interrupts : Interrupt line see Documentation/devicetree/ > bindings/interrupt-controller/interrupts.txt > - wakeup-source : This device has wakeup capabilities. Use this > @@ -31,3 +37,10 @@ Example: > interrupts = <2 IRQ_TYPE_EDGE_FALLING>; > wakeup-source; > }; > + > + battery-fuel-gauge@36 { > + compatible = "maxim,max17048"; > + reg = <0x36>; > + maxim,alert-low-soc-level = <10>; > + maxim,double-soc; > + }; > -- > 2.27.0 >