Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1208085ybh; Mon, 13 Jul 2020 12:06:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBfAlLnnd1n0GwB3qGUUgjOH8J+bDaSESbinKiQD2XhaJ0dFMzHpMAN4MBIUaHx24rGwGk X-Received: by 2002:a05:6402:1c0f:: with SMTP id ck15mr778963edb.155.1594667163533; Mon, 13 Jul 2020 12:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594667163; cv=none; d=google.com; s=arc-20160816; b=zOJ0s+Lm9dBVSxR3KFymNsajpFEwOUZnkT9lZFKo80BxWrnEGbgxTT+ZR7ST8zogHz zzkRi5fUVhPtiU8SEhPpk2b4WqTYqH/UaxAY/iOR3fSRz8haws2dndjMXJTEq80G6A0Z e9rvSQxqmXK7E7xdB/Q77KLfQTTJd/ats1dv+A8l0LxVUgMhzeGtvW9K8W+aPAyEfF9U Wv6Mxh5JNMTugDw5dBrl4Y1Yglb0kMfScqZq9l9UC3sK8Ub9IhKSnaPbetOiV/Yk8TNE +yfcfneOyF91HX8kYjlmgwUyc7blTtKp4Jbk6tuBGImeV9hE6N1dddbnVXVAR7kH6UoE m1Tw== 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=l5rWVgnnCloHt41CFPCxRV5qmnmySbxOsQcq4blbDZU=; b=XgD6QdqyeF+tp21RQLNkSZReGM9JShSZWvAgls3S6Fjis/Pug5XMokfUIT7xhAFoee J7FQTiVLpoXoySn4MtPHbjDLHJvB/RAeD5LNFV7n6k6JqM1fFPm7KPkhHDTl07x+rX2+ r1Frg6VEIM5QfyDtPrPG7dtYsGVapM75hsAXFWWcULnPASsctHzHe9OO4oNYpSMhlmYf jGqz7Nu2GFtkH3KAaIIX4dge4tTN+dDLxW1604JKPlx14Ogy12li/A+83iezPdhH2Een vmu8GXSSAkXPqwSlS7zIHqcJUSfb3cFqeR2buNAl5P29+wPz4iOj9Jc+pmGq5r7A9ImX i6sQ== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si5071748ejd.290.2020.07.13.12.05.39; Mon, 13 Jul 2020 12:06:03 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726582AbgGMTDN (ORCPT + 99 others); Mon, 13 Jul 2020 15:03:13 -0400 Received: from mail-il1-f196.google.com ([209.85.166.196]:37736 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbgGMTDM (ORCPT ); Mon, 13 Jul 2020 15:03:12 -0400 Received: by mail-il1-f196.google.com with SMTP id r12so12151790ilh.4; 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=ZMUT17gJPmBGA6zePd0uFpkmKqt59ITqHZGlUtkyL4JtM1vo28ypmBUssz7LhSrHDr ohGPxkcUcDziTjb5llGP7U/UP0uBNHjmXJSMeloKbkVCj8OdNDa9x7jxhUugJqi+xMh3 qE+kJdGuJjyfYQk10LdLf0yYXhrx2Vl5R38CzshG611ol0Q2CNffl9ftDeuIRj1txGpl Od1niqW1icvujCGxGFkGk2R2Az9dBzHAsfIgOrmcWwThPnpV0nUJqzGeoVU2jIJHhru3 wWa2oCVZqlrKqWA3OsOInzDHN0tr/yOU2Qj+51Q1OrP2x96GVmHF5vq6r59SAftj6cya 4XDw== X-Gm-Message-State: AOAM530zoQHoTgCEp0NyYrBMdHYz0QLTMkRaSidrFuAr/SvD54Uv5zQJ 7brQJpTG5VXorvW0cOUES6LuBJ1ueg== 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >