Received: by 10.192.165.156 with SMTP id m28csp2643854imm; Sun, 15 Apr 2018 05:57:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/0k61zszalz14M1GCbczVombirQYCZZ5AKVyp3e5NYNJ9NC+SXeeJLkNNb0Zd7HnJdPZvE X-Received: by 10.99.39.135 with SMTP id n129mr9839398pgn.167.1523797050450; Sun, 15 Apr 2018 05:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523797050; cv=none; d=google.com; s=arc-20160816; b=K8lTBO9boJU2Jf4f4zij846svkLp7RqNCOvDC1UnlfTTcF+mdT5B6oDh1IFBS2/fwY 9exjR/+aNKilN83pOuc2dca3V8iHfyt5xrmc3Trut19FxJtRGTm2iH51iy/ovfYUB0YF Nz8elCd2KjoymsC2vQUdspxEH6ITOMecpFac/GU383JNl+yqQbC7yVse20K/ud9fCTSg ApNOvZkNefoO4F1uleR75GzG6x0YXxnBs5pyHuImfMmiXGK6b9QYilYgEN2gcw9ahXmR tmT6DznxPujmoeVcZICU47xlbD0/R3R8LDL6nrD/AJWJIYJvIzHHoN3WP+I1Rj1jtgGa BFNA== 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:dkim-signature:arc-authentication-results; bh=WtkgVL1LngSeiZyOOnlhybCVidodAsl1wuXiB06Xuy4=; b=mTYV+ycC4vY4uH/w2SSgo36JHFfCGuaZzNJzDczlspvwN2XORbLdgEJj7qf9K4cJ3f c1egW50wN/j5nqKralkAPkeCFAlI2GpPethNBU5q3Tj6D6bP3qua1ckVxokfXre8S6xt 8clFQOQcWw7i+jUuJqrTvMxxsMS/8zpBT3A4Ol+hZRdupw+x8ZkrC5C/Nb3LPdXVYAuP Cimp9N+uHKTkKNqk1bnFLWyWvgIznIEnvcFihzw5iv/DyB2xHBw1d+P7RCZ25Ywlq4w7 RMRYgjj8B+nafoDBONkcSecCYgGo3gOvOpu+m/IjIR5XmdDb8Og1j1g4db8s5nskJ1xa hK6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i3s/pdzD; 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=pass (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 j61-v6si10101039plb.317.2018.04.15.05.57.16; Sun, 15 Apr 2018 05:57:30 -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=pass header.i=@gmail.com header.s=20161025 header.b=i3s/pdzD; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752528AbeDOMzh (ORCPT + 99 others); Sun, 15 Apr 2018 08:55:37 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:46740 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752470AbeDOMzd (ORCPT ); Sun, 15 Apr 2018 08:55:33 -0400 Received: by mail-wr0-f193.google.com with SMTP id d1so18796722wrj.13; Sun, 15 Apr 2018 05:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WtkgVL1LngSeiZyOOnlhybCVidodAsl1wuXiB06Xuy4=; b=i3s/pdzDxupiX28m+v+A0fO6/wfuTeumq8Iyl72EMvOk1xc9xCvq/d7HTyySBm/WQf 8ZORBiLslhbhSLmCdH7c9PJgTVLk33jPjlrM2YAmn6dEbAy2YbGZutqWEedY6qRMRyCa xlUSNRP8yPmOiC1xZs2gFs3B+mPGWMJ+SDU7uMRZzX4ICvaTSX05u0Ece3BP0/FxIh96 doGuPt+UypIFLWkdrQgzOjeVoo+XtDufPcPRE9YsP5wz4CxBsSsnAJJ/Zb5jN08Qf7cX odmrG5st7sc4+V1s9FFfD2tsCCddu9pJZcgspcRerWvh998E+k3NhZ9BiVmdAUg7G2dt JAtg== 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:user-agent; bh=WtkgVL1LngSeiZyOOnlhybCVidodAsl1wuXiB06Xuy4=; b=mfxkS/KFoWySoPHKwXvnNQ3AsFsxxux4WC+idbXUl8JJdONeXHj74Ch2LvoBI+VNmE ZDNe6/adnAuxFrteVoOIVv/833gUrW2jSG35GaysBwFSpIufes1gIGTFSS0gw3EjNv6j DnLG8n14QIT1O0XYmKgpbzycXlbqox4fqr9tiTLB40ygKIa1ex1D71+LLGN+xBM0p2RS 2n6CYWqTZPrwjnKk6vVq6ELx/+W0H3kpX5IJl+BlMu7AekC7BJe7BxCwEd/BtfRo1Lok vZYmYmh+1JF1gq4KT61IEJ7LXp17tEd9Eod8KSUcFAkLc5vvjgab5rqvjeKP6fIJH4zi jV3w== X-Gm-Message-State: ALQs6tB/PpWhrsbRSCOwlxkyDqPmm5NL8G/gZV2gwkrj8pma+vFAKVAH wMcZKWKZnnnGO3cgcgs50g== X-Received: by 10.28.40.212 with SMTP id o203mr8406589wmo.92.1523796931744; Sun, 15 Apr 2018 05:55:31 -0700 (PDT) Received: from arch.home (host86-141-127-135.range86-141.btcentralplus.com. [86.141.127.135]) by smtp.gmail.com with ESMTPSA id 134sm5933928wmt.29.2018.04.15.05.55.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Apr 2018 05:55:31 -0700 (PDT) Date: Sun, 15 Apr 2018 13:55:28 +0100 From: Craig Tatlor 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 Subject: Re: [PATCH v4 2/3] dt-bindings: power: supply: qcom_bms: Add bindings Message-ID: <20180415125528.GA15803@arch.home> References: <20180407135934.26122-1-ctatlor97@gmail.com> <20180407175802.29444-1-ctatlor97@gmail.com> <20180407175802.29444-2-ctatlor97@gmail.com> <20180413163527.ludqnnc5nkj4spre@rob-hp-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180413163527.ludqnnc5nkj4spre@rob-hp-laptop> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 13, 2018 at 11:35:27AM -0500, Rob Herring wrote: > On Sat, Apr 07, 2018 at 06:57:45PM +0100, Craig Tatlor wrote: > > Add bindings for the Qualcomm Battery Monitoring system. > > > > Signed-off-by: Craig Tatlor > > --- > > .../bindings/power/supply/qcom_bms.txt | 93 +++++++++++++++++++ > > 1 file changed, 93 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/power/supply/qcom_bms.txt > > > > diff --git a/Documentation/devicetree/bindings/power/supply/qcom_bms.txt b/Documentation/devicetree/bindings/power/supply/qcom_bms.txt > > new file mode 100644 > > index 000000000000..6296399edc09 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/power/supply/qcom_bms.txt > > @@ -0,0 +1,93 @@ > > +Qualcomm Battery Measurement System > > + > > +The Qualcomm Battery Measurement System is found inside of Qualcomm PM8941 > > Is it Monitoring or Measurment? > > > +PMICs. It provides OCV and coulomb counter registers that allow the kernel > > +to infer a capacity level. > > s/kernel/OS/ > > OCV? > > > + > > +Required properties: > > +- compatible: Should contain "qcom,pm8941-bms". > > +- reg: Specifies the SPMI address and length of the > > + controller's registers. > > +- interrupts: OCV threshold interrupt. > > +- io-channels: Should contain IIO channel specifier for the > > + ADC channel that reports battery temperature. > > +- io-channel-names: Should contain "temp". > > +- qcom,fcc-temp-legend: An array containing the temperature, in degC, > > + for each column of the FCC lookup table. > > What's FCC? > > > +- qcom,fcc-lut: An array of FCC values in mah, one entry for each > > + temperature defined in in qcom,fcc-temp-legend. > > +- qcom,ocv-temp-legend: An array containing the temperature, in degC, > > + for each column of the OCV lookup table. > > +- qcom,ocv-capacity-legend: An array containing the capacity for each > > + row of the OCV lookup table. > > +- qcom,ocv-lut: An array of OCV values in mV, one entry for each > > + capacity defined in qcom,ocv-capacity-legend. > > Need to specify the sizes of these if not 32-bit. > > All these seem to have units, so add unit suffixes as defined in > property-units.txt. Should i change code to use microamphours & microvolts or add a new suffix? > > > + > > +Example: > > + > > + pm8941_vadc: vadc@3100 { > > adc@... > > > + compatible = "qcom,spmi-vadc"; > > + reg = <0x3100>; > > + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + #io-channel-cells = <1>; > > + > > + bat_temp { > > + reg = ; > > + }; > > + }; > > + > > + bms@4000 { > > + compatible = "qcom,pm8941-bms"; > > + reg = <0x4000>; > > + interrupts = <0x0 0x40 0x4 IRQ_TYPE_EDGE_RISING>; > > + interrupt-names = "ocv_thr"; > > + > > + io-channels = <&pm8941_vadc VADC_LR_MUX1_BAT_THERM>; > > + io-channel-names = "temp"; > > + > > + qcom,fcc-temp-legend = /bits/ 8 <(-10) 0 25 50 65>; > > + qcom,fcc-lut = /bits/ 16 <6010 6070 6680 6780 6670>; > > + > > + qcom,ocv-capacity-legend = /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 = /bits/ 8 <(-10) 0 25 50 65>; > > + qcom,ocv-lut = /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>; > > + }; > > + }; > > +}; > > -- > > 2.17.0 > >