Received: by 10.192.165.156 with SMTP id m28csp929490imm; Fri, 13 Apr 2018 10:12:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+JlZ8VcfL9sDr73NWT4I8/EXTVfMqReOdaMTU3F2y5vMEcMPbBha2MxA9MTWvgLWBe+LtU X-Received: by 10.98.15.92 with SMTP id x89mr12238923pfi.7.1523639567489; Fri, 13 Apr 2018 10:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523639567; cv=none; d=google.com; s=arc-20160816; b=lb35O7QxHkGYT1GnW4QKRYEe1ah73Yh2LkdCmEzImx+kgsDmBdsuQWjzk8kI+qrh+9 DOw2Wr++i/p9nFiz3VvAEMMNBplufases/O90W9byBMsR44dEqIOgvMkw9QGyakBvZIh zZv76bbDaTzA6dy5nsg1tNPwRw003AKeBnNYraArEE4NOuP6sEhN0njj8S0V/u30u7Cv BP5zQ+jjRRzZ6xmOf8J+gvOHeLfgCcuB74d/l2XXeCxx8pVkbaq8aUEIbQXA4TYyHIEW i1eEeSNxaiB7KvObWzA9JxQXxCGSeQUdwbR8t+U9A+hfmXKBp3JIbh5WomFgdHRrU7ck 9bHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature:arc-authentication-results; bh=bJRFGCKnKZzjRtny9ST74v8A6eZfUvufrmK2ax/zWo4=; b=VsFw/JFmSqpuvhgVLB4dbTxLh4/vkVZfZljj1Ib0qciG/nad4EKoo/uz8wSfzD0g3m qXSPTF322P7rkvlSp+163akBGxHMLbmEDb9Xtm3YlRLC/y9aEZ3/PsfcBL1AwjF29w0J 6i5nK6GTx+a55KzcMXMvdK6nvCnzMlHXFJR+L+uckeD83LheWhD+ppbLIPkeZowCtfVi dx56MU+v9DXlouG7pIh2woDqoyGZgbv/FL74f56YgTriPa16WVXZp0Tk9KqPK3K/9yHN 0ClRi3vOb/mAw9JZ5Y4TogslvH3YpoPUB1XKZL1bYIVAe6SqeYjjsCRbT4NOS9L5Vbyt bysg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DfLx7fIZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si1148816pgn.131.2018.04.13.10.12.23; Fri, 13 Apr 2018 10:12:47 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DfLx7fIZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752486AbeDMRK5 (ORCPT + 99 others); Fri, 13 Apr 2018 13:10:57 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:38220 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751536AbeDMRKq (ORCPT ); Fri, 13 Apr 2018 13:10:46 -0400 Received: by mail-wr0-f194.google.com with SMTP id l13so8854283wrb.5; Fri, 13 Apr 2018 10:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:cc:from:message-id; bh=bJRFGCKnKZzjRtny9ST74v8A6eZfUvufrmK2ax/zWo4=; b=DfLx7fIZGiG5j+H3gbD1ZFz1x5fOiUMqE4/rrjAHedC7bg+824azZXxUPbxp2kQHB+ rtqgUDNMu4DlQVs1g1hdvrLVd5DvZ/rGrpFb+mIXOG1+5SHk5iJgtGD/ssb+EVmunVw1 vDOGK5Ybfn053CQgjipk5Pwa9xix9uBrlEEebmf6DBb/udTHRmtwZKLfWRxj1WFOwSgC 0HkO0J6AadodLatPahcTEXky+nhV+Gy3GimgK/3dR7Kk2j0/CvYJdhiTkbz3ab82DSzQ vGxVCLOdhpcZjg5uKthdEF1KB5zNtNYtEWesC+MbPuMt9Je87rBIO4WmpKJx1lcwRAe1 vc3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:cc:from :message-id; bh=bJRFGCKnKZzjRtny9ST74v8A6eZfUvufrmK2ax/zWo4=; b=YqoJ2SdcXM6a5pQZgHY2EfcLsuQhAM4TOkfYSGqXXuAyVDJFWsTq1lbfNK88cORwGK lxe92HIqVCeRCGjKeJK64bT8oxnkY/80XblG/+/JVCKOYvNvpOLa6DceGOw1OHyBP+xJ LX0+OOHYm8NddOE2wIt5fKo7GW++wxHFqqOh4MB+IYfjgptlTtSSX+QR6miqkZFAirkM I8h0qn8eTpftTpRS6/Y51M4y20SaPLoIjcsahyc2BovBoT0ZOs0Z+7VjiMp+seKKFa6B ULyvzmYOmB0D5LuQeVvrWW+DLGrQ3ApiH+6010uSdKJMP/CCHQm5oiHBfk0dL4UwsuCR 940Q== X-Gm-Message-State: ALQs6tCGP1ta+Ca3rWcEPVvZPREb/hCgEmrKBo0pTds70yZ797/3XG+4 jmeMTqi8tHmjqOS2F0+EOw== X-Received: by 10.28.35.205 with SMTP id j196mr4083585wmj.108.1523639444440; Fri, 13 Apr 2018 10:10:44 -0700 (PDT) Received: from [192.168.0.8] (cpc106547-shef14-2-0-cust771.17-1.cable.virginm.net. [80.5.239.4]) by smtp.gmail.com with ESMTPSA id b47sm2156361wrg.13.2018.04.13.10.10.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Apr 2018 10:10:43 -0700 (PDT) Date: Fri, 13 Apr 2018 18:10:42 +0100 User-Agent: K-9 Mail for Android In-Reply-To: <1D7FA61D-2233-45DC-A244-B2914BB1B29F@gmail.com> References: <20180407135934.26122-1-ctatlor97@gmail.com> <20180407175802.29444-1-ctatlor97@gmail.com> <20180407175802.29444-2-ctatlor97@gmail.com> <20180413163527.ludqnnc5nkj4spre@rob-hp-laptop> <1D7FA61D-2233-45DC-A244-B2914BB1B29F@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v4 2/3] dt-bindings: power: supply: qcom_bms: Add bindings To: Rob Herring CC: linux-arm-msm@vger.kernel.org, Sebastian Reichel , Mark Rutland , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Linus Walleij , Andrew Morton , Randy Dunlap , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org From: Craig Tatlor Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13 April 2018 18:08:54 BST, Craig Tatlor wrote: > > >On 13 April 2018 17:35:27 BST, Rob Herring wrote: >>On Sat, Apr 07, 2018 at 06:57:45PM +0100, Craig Tatlor wrote: >>> Add bindings for the Qualcomm Battery Monitoring system=2E >>>=20 >>> Signed-off-by: Craig Tatlor >>> --- >>> =2E=2E=2E/bindings/power/supply/qcom_bms=2Etxt | 93 >>+++++++++++++++++++ >>> 1 file changed, 93 insertions(+) >>> create mode 100644 >>Documentation/devicetree/bindings/power/supply/qcom_bms=2Etxt >>>=20 >>> diff --git >>a/Documentation/devicetree/bindings/power/supply/qcom_bms=2Etxt >>b/Documentation/devicetree/bindings/power/supply/qcom_bms=2Etxt >>> new file mode 100644 >>> index 000000000000=2E=2E6296399edc09 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/power/supply/qcom_bms=2Etxt >>> @@ -0,0 +1,93 @@ >>> +Qualcomm Battery Measurement System >>> + >>> +The Qualcomm Battery Measurement System is found inside of Qualcomm >>PM8941 >> >>Is it Monitoring or Measurment? Monitoring, not sure how I missed that :) >> >>> +PMICs=2E It provides OCV and coulomb counter registers that allow the >>kernel >>> +to infer a capacity level=2E >> >>s/kernel/OS/ >> >>OCV? >Open Circuit Voltage - should I expand this? >> >>> + >>> +Required properties: >>> +- compatible: Should contain "qcom,pm8941-bms"=2E >>> +- reg: Specifies the SPMI address and length >of >>the >>> + controller's registers=2E >>> +- interrupts: OCV threshold interrupt=2E >>> +- io-channels: Should contain IIO channel specifier >for >>the >>> + ADC channel that reports battery temperature=2E >>> +- io-channel-names: Should contain "temp"=2E >>> +- qcom,fcc-temp-legend: An array containing the temperature, in >>degC, >>> + for each column of the FCC lookup table=2E >> >>What's FCC? >Full charge capacity - Should i also expand this? or maybe explain in >header paragraph? >> >>> +- qcom,fcc-lut: An array of FCC values in mah, one >entry >>for each >>> + temperature defined in in qcom,fcc-temp-legend=2E >>> +- qcom,ocv-temp-legend: An array containing the temperature, in >>degC, >>> + for each column of the OCV lookup table=2E >>> +- qcom,ocv-capacity-legend: An array containing the capacity for >>each >>> + row of the OCV lookup table=2E >>> +- qcom,ocv-lut: An array of OCV values in mV, one entry >>for each >>> + capacity defined in qcom,ocv-capacity-legend=2E >> >>Need to specify the sizes of these if not 32-bit=2E >Right=2E >> >>All these seem to have units, so add unit suffixes as defined in=20 >>property-units=2Etxt=2E >Will do=2E >> >>> + >>> +Example: >>> + >>> + pm8941_vadc: vadc@3100 { >> >>adc@=2E=2E=2E >Okay=2E >> >>> + compatible =3D "qcom,spmi-vadc"; >>> + reg =3D <0x3100>; >>> + interrupts =3D <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; >>> + #address-cells =3D <1>; >>> + #size-cells =3D <0>; >>> + #io-channel-cells =3D <1>; >>> + >>> + bat_temp { >>> + reg =3D ; >>> + }; >>> + }; >>> + >>> + bms@4000 { >>> + compatible =3D "qcom,pm8941-bms"; >>> + reg =3D <0x4000>; >>> + interrupts =3D <0x0 0x40 0x4 IRQ_TYPE_EDGE_RISING>; >>> + interrupt-names =3D "ocv_thr"; >>> + >>> + io-channels =3D <&pm8941_vadc VADC_LR_MUX1_BAT_THERM>; >>> + io-channel-names =3D "temp"; >>> + >>> + qcom,fcc-temp-legend =3D /bits/ 8 <(-10) 0 25 50 65>; >>> + qcom,fcc-lut =3D /bits/ 16 <6010 6070 6680 6780 6670>; >>> + >>> + qcom,ocv-capacity-legend =3D /bits/ 8 <100 95 90 85 >>> + 80 75 70 65 >>> + 60 55 50 45 >>> + 40 35 30 25 >>> + 20 15 10 9 >>> + 8 7 6 5 4 >>> + 3 2 1 0>; >>> + >>> + qcom,ocv-temp-legend =3D /bits/ 8 <(-10) 0 25 50 65>; >>> + qcom,ocv-lut =3D /bits/ 16 <4288 4288 4306 4315 4315 >>> + 4261 4241 4259 4266 4246 >>> + 4201 4181 4201 4207 4187 >>> + 4153 4133 4150 4155 4135 >>> + 4105 4085 4100 4104 4084 >>> + 4058 4038 4052 4058 4038 >>> + 4012 3992 4004 4014 3994 >>> + 3970 3950 3959 3971 3951 >>> + 3931 3911 3915 3927 3907 >>> + 3899 3879 3880 3884 3864 >>> + 3873 3853 3851 3853 3833 >>> + 3848 3828 3827 3829 3809 >>> + 3829 3809 3808 3809 3789 >>> + 3815 3795 3791 3791 3771 >>> + 3801 3781 3775 3772 3752 >>> + 3785 3765 3751 3746 3726 >>> + 3767 3747 3727 3719 3699 >>> + 3750 3730 3702 3692 3672 >>> + 3728 3708 3680 3672 3652 >>> + 3720 3700 3676 3665 3645 >>> + 3712 3692 3670 3660 3645 >>> + 3695 3675 3658 3648 3633 >>> + 3662 3647 3629 3620 3610 >>> + 3620 3605 3589 3580 3570 >>> + 3562 3552 3538 3529 3519 >>> + 3490 3480 3474 3470 3465 >>> + 3403 3398 3388 3380 3375 >>> + 3320 3300 3255 3221 3206 >>> + 3000 3000 3000 3000 3000>; >>> + }; >>> + }; >>> +}; >>> --=20 >>> 2=2E17=2E0 >>>=20