Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2248788imm; Thu, 20 Sep 2018 10:00:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZhi2BcIB5rYNdeQHQCSnmUv0CybTAO2MVq6mZh6h9ciZaNj526upwdfooS7gnlrpCoMbm6 X-Received: by 2002:a63:ff50:: with SMTP id s16-v6mr38076421pgk.241.1537462832367; Thu, 20 Sep 2018 10:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537462832; cv=none; d=google.com; s=arc-20160816; b=sdVzNlWLPRo4+RvPg6/2o9Y2FrKxbLREtzb7HgECAYL0iz6Iyz5DfroPXAsFsD35HI ev2zINoRWdmbc3mgrMkQOB62Wh/E3jISFR6scrdxoF+lWklbLBKwQaN+sDxMksQSCADV u/gsRkC+sZ4INCDHK8EyznSQtqGiV4VwHxdzHDPjeZPj7y1HW6hbMdN3RnLohq3aIvIO BPiSGGTtjooqbdUSG11Vcrzf2fIlgF01UV6VVDmxjwssuzYnlu7rJimF9p8M0rupE35a 6sOIEXQZzGbnZ+V1YRKvXbUAuvBnl3WoHURFuM2N9yS+YjcZwj2zRbGXLPjAbTZDTpoh Q9VA== 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=zLkRd9h5+9qdZVU6BqjyVd7LYr4c0voPhN7yIcdqMXc=; b=hb+mwBYAStOt5+e6DzkipTuc5fgGContVTbT1ENlEV4sn3CE7oXt2WbFam4Wp/WMWc 8k3H/nHcG36lRpmRuusp3DegzJSgGNUOGMNnUmSaoDM74S9eQNgKwiIR+eP3S2uceEJd IYO4qTtRR3z3tG9gRwUZTDQ5V4PHGHWkbwxZrldVk+KhJpIxf2CfJgLK+2n4Gqj6jfn4 1yVZRxPi7Y42gDwITQGtwN1CuXM8KZ94d05/mfYfI00LU3y070OZno6QiFLlPwIce07d klMfvTjeYC8/2YaKjW051djfg1s31uHa/fY+jqIgJwxnptpkVsKnQPsLQ6qHfnd4BZ4Q NTrw== 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 d70-v6si26770418pfd.114.2018.09.20.10.00.15; Thu, 20 Sep 2018 10:00:32 -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 S1730654AbeITWnQ (ORCPT + 99 others); Thu, 20 Sep 2018 18:43:16 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:46780 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726540AbeITWnQ (ORCPT ); Thu, 20 Sep 2018 18:43:16 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 6990A260C44 Received: by earth.universe (Postfix, from userid 1000) id 6337F3C092C; Thu, 20 Sep 2018 18:58:47 +0200 (CEST) Date: Thu, 20 Sep 2018 18:58:47 +0200 From: Sebastian Reichel To: Craig , Baolin Wang , Rob Herring Cc: linux-arm-msm@vger.kernel.org, Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 3/4] dt-bindings: power: supply: qcom_bms: Add bindings Message-ID: <20180920165847.6xqzeoqzqkyotshx@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="s2im6fa4l5wivfec" Content-Disposition: inline In-Reply-To: <4BBA3F28-A769-4F09-86DC-1E3906C53B26@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --s2im6fa4l5wivfec Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [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 = /bits/ 8 <100 95 90 85 80 75 70 65 60 55 50 45 ...>; ocv-temp-legend-celsius = /bits/ 8 <(-10) 0 25 50 65>; ocv-lut-microvolt = <43050000 43050000 43030000 42990000 Proposal B (from SC27XX binding): ocv-cap-table = <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 = <(-10) 0 10>; ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>, ...; ocv-capacity-table-1 = <4200000 100>, <4185000 95>, <4113000 90>, ...; ocv-capacity-table-2 = <4250000 100>, <4200000 95>, <4185000 90>, ...; -- Sebastian --s2im6fa4l5wivfec Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAluj0b8ACgkQ2O7X88g7 +prcyg//SsMRNfaAnkvK4BqXeDhuk1A8QHu2iJLMyfQacPLpt9p5/QVXbmdxsTf1 X2EjvKJVtOs/tP+saYD7NPK1ShhX4Shryf7LbyzpGz8HFLar1TKqA3C+8g53bWZ2 unPCWezkLy5IjFTi7To36byC8/woOUZu00jMZhaRFQ9I1bnT9Wf1iMYUqBasXB9b 34aOH0oaNJcRWqfBhyqkWmoM1xgetRy2vJD6Ef+ct2GA/OscI+l9Og1tF8xKQwR+ I2BiFYPiIJmc6yVLWXva5wO2KHHUUh8MBaRLz4mQvx7vawz7sBos1VG7hCIVki1u rkEVksvHjLTo5OK1wDdjSM66LjwFmTC84AWWG+jiALwgZa/7ohKHtRu/25rb3KsE 0VUW3ckKRM/UKsFtwASPzCmVZcBmQrGAKEqE5ep45ZXHHnWEoS23DZdEQDHnw+gz NbnI1gqrwjtxedraJS/0j0B8kEbEiIotvRdChUI+fyUSO9fESnRf9sMhARy89Pl0 1ZgkN3+8Fk/YgOauvQY3QZVkuCpiZ55OVzmZZ8sUxzOPfKEu3kBtFEwi5bJst1E9 OAgC8wwaCIj/0i1e3XLApuPKKfLyX4xXg77/CaGl5GPw6O6+0zw6a2rRdvcnp3H+ sidDINWz/DuygOtYwlb2t6aVedLMG+4thQLhjJuDiQeK61l0lDE= =5hQf -----END PGP SIGNATURE----- --s2im6fa4l5wivfec--