Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp76804imm; Thu, 20 Sep 2018 18:41:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZyEelLGi77T4M53kDx2Ltf+2yt7j+czPo7iHlzEzmG70Fsri9kVdg4Sz/S5K1s6b0VW0H0 X-Received: by 2002:a63:9246:: with SMTP id s6-v6mr37050414pgn.141.1537494095712; Thu, 20 Sep 2018 18:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537494095; cv=none; d=google.com; s=arc-20160816; b=WPbDnbwTK1GjREewxhg8dTS+HHoP6+QiNLbXT6yuA72jgp2lAvQS8P3ZF4PnMj0eAs shIb2i/+QkWbUYmgQ98GvftP+alCtIcI0AlOuWIgOtuLfiy2/PJ1hx2tbKZDW/NDzZ2R jai4HvpQ/U3VFA0eC4RlULTn7E96PI4H9yxzedj51uRXo957J5pYgiBa3vafs5BWOoy6 qErhJ2WrUtHt8SWXQM+eseqf9bk/DXrFVQtGFu+9sByi5ilq2OulseKI0FI5uF/55WSD ULfinSoDZWYUB0x9t22q4eDbTyC/JlHea1hScEieHJnZd5o6hUppZVf4y3/DjURibIMY +ixQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TZ8lkwMGs8wTeX05E7c0iWjYJTydosZrHQ5lfu9wNh0=; b=qFEa1dykVZCMHmkBfVhlo1POkofQtKAn3OBVJwoKPqcNr/0neIF4/iQXflYGHrsTDK I000deYqn74veDvovRPUfEhFNFL5cL6pm2Fts8nFTHR5W4NoPFfanEwPeGsCM1+mPAPB STZIKPD+6GFoKyHqkabKfh1yA+/1FzqQN+EX/n/K3eHaExGpu0ydtvHFIBlPgR8O/aM2 ikHuClxCvhc1j4VTdJIl8H5gR0BIRf5A9GwZSUyVJonahcSIOZyUq/2kff+A4TfDam9i +yTB8ifY0TQhoq1lWkvQIuIKvea+kj+EqZSQSV5UapimlTJLTivtrOgNDZuXiXLwVeUI Nwig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16-v6si24659077pgg.619.2018.09.20.18.41.19; Thu, 20 Sep 2018 18:41:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388931AbeIUH1h (ORCPT + 99 others); Fri, 21 Sep 2018 03:27:37 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:49222 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727699AbeIUH1g (ORCPT ); Fri, 21 Sep 2018 03:27:36 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 88C7727DB8D Received: by earth.universe (Postfix, from userid 1000) id 692943C092F; Fri, 21 Sep 2018 00:13:11 +0200 (CEST) Date: Fri, 21 Sep 2018 00:13:11 +0200 From: Sebastian Reichel To: Baolin Wang Cc: Craig , Rob Herring , linux-arm-msm@vger.kernel.org, Mark Rutland , Linux PM list , DTML , LKML Subject: Re: [PATCH v7 3/4] dt-bindings: power: supply: qcom_bms: Add bindings Message-ID: <20180920221311.mrynysyh54si4g7f@earth.universe> References: <20180407135934.26122-1-ctatlor97@gmail.com> <20180614151435.6471-1-ctatlor97@gmail.com> <20180614151435.6471-3-ctatlor97@gmail.com> <20180916121045.aptj6nciwskfg4st@earth.universe> <4BBA3F28-A769-4F09-86DC-1E3906C53B26@gmail.com> <20180920165847.6xqzeoqzqkyotshx@earth.universe> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6vhc6aw6werrrbl3" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6vhc6aw6werrrbl3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Sep 21, 2018 at 04:08:28AM +0800, Baolin Wang wrote: > Hi Sebastian, >=20 > On 21 September 2018 at 00:58, Sebastian Reichel > wrote: > > [Dropped a couple of people from CC, added Baolin] > > > > Hi Craig, Baolin and Rob, > > > > On Thu, Sep 20, 2018 at 03:32:29PM +0100, Craig wrote: > >> On 16 September 2018 13:10:45 BST, Sebastian Reichel wrote: > >> >Sorry for my long delay in reviewing this. I like the binding, > >> >but the "qcom," specific properties should become common properties > >> >in > >> > > >> >Documentation/devicetree/bindings/power/supply/battery.txt > >> >and referenced via monitored-battery. > > > >> Thanks for the review, what bindings for ocv would you prefer? The > >> spreadtrum ones or mine? > > > > Most importantly I want to see only one generic binding supporting > > both use cases. As far as I can see there are two major differences: > > > > 1. Qcom uses legend properties and SC27XX embedds this into data > > 2. Qcom supports temperature based mapping > > > > The second point is easy: Not having temperature information can > > be a subset of the data with temperature info. The main thing to > > discuss are the legend properties. I suppose we have these > > proposals: > > > > Proposal A (from Qcom BMS binding): > > > > ocv-capacity-legend =3D /bits/ 8 <100 95 90 85 80 75 70 65 60 55 50 45 = =2E..>; > > ocv-temp-legend-celsius =3D /bits/ 8 <(-10) 0 25 50 65>; > > ocv-lut-microvolt =3D <43050000 43050000 43030000 42990000 > > > > Proposal B (from SC27XX binding): > > > > ocv-cap-table =3D <4185 100>, <4113 95>, <4066 90>, <4022 85> ...; > > > > I prefer the second binding (with mV -> uV), but I think it becomes > > messy when temperature is added. What do you think about the > > following proposal (derived from pinctrl style): > > > > Proposal C: > > > > ocv-capacity-table-temperatures =3D <(-10) 0 10>; > > ocv-capacity-table-0 =3D <4185000 100>, <4113000 95>, <4066000 90>, ...; > > ocv-capacity-table-1 =3D <4200000 100>, <4185000 95>, <4113000 90>, ...; > > ocv-capacity-table-2 =3D <4250000 100>, <4200000 95>, <4185000 90>, ...; >=20 > For SC27XX, we have no temperatures consideration, but I think > Proposal C can be compatible with our case. Yes. I think for SC27XX proposal C could be used like this: ocv-capacity-table-temperatures =3D <20>; /* room temperature */ ocv-capacity-table-0 =3D <4185000 100>, <4113000 95>, <4066000 90>, ...; With only one curve defined it would be used for all temperatures. -- Sebastian --6vhc6aw6werrrbl3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlukG3QACgkQ2O7X88g7 +pqK8A//UHm+2Hn8GO+wWI7y3JLRVXeF+/dLftzWW/DkPLcH5ZLMa5SssXYPMD6a hGMcYMqgVKSmhtSjXOoazRO7t4KzO4YmqMERGajfFq1lEN/5ZkF/exo0rr4tiqZz nCCX52eOAPUVkqHKBEVMIb4Zgtg9hrHxavZsD42TkaPm2gatyn5ackJ9DvNtXZ38 p7bdTi17AqD7gODIIg3ChqUimIUZPgZ494UtJkdWZBDnVyETlrFyaqJEoHNbkU9F zNRPcGuFhKs4rxRgC7QpDc9ieO2o8A+B1HI26muyUvSJ78YDjWDmwshWsOCuAiiw LOcih1AQNiSVJu+FUn1nP3w/MMzevuh6/Ubbl+VqHH2oln3ptCUsMU3yHvo6Mss9 cAMc0KsP8Jd7+b+Uq0TnCs/QhzUIbS8H1NnAXJVOvDzD6/7whwDlAuzWseptE2HV 8XAwHeL6XnAcukY461GkK5Z3h1jx/QdmnrTLeYuvDBHL629rE7WfOe9wQkVZQ4Zi WdPV2QVi21DtpTaBQ9ZKxojt9bVtVASt0BZg+OiwuSrRrqpAoizJFMxDsbomJjl5 LbER0SiVJ4QSCnuwz3bkykQBV8jcluuG6eFs9fUFoYs0ALDNAaIHsp1/IlDxaw0K 6NlbOguMaQXQEWP0QUt3yIKpGhUD2XbmnqovMBSJK9nkpTfAC2w= =RK6h -----END PGP SIGNATURE----- --6vhc6aw6werrrbl3--