Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp889625pxb; Wed, 27 Oct 2021 14:32:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKV0qTDdWk/S1y2fvT+3okdF6+Oy6PxxMisAO6mzjQgTd41ZnhC/CUtmlNE3KX0SV/zXAk X-Received: by 2002:a05:6a00:21c6:b0:44c:937:fbf3 with SMTP id t6-20020a056a0021c600b0044c0937fbf3mr120653pfj.2.1635370348769; Wed, 27 Oct 2021 14:32:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370348; cv=none; d=google.com; s=arc-20160816; b=iFEiqkqrciD/ZztgEgT9qV5m0Vq4uJ3J0E9Mdc6utPofouDiVBTlhpjRWiq1RSPemU 15dtYekbQHL43/fRIra9LFxIXUT25lZt92PF+nvrLUa21O5zDuCIzpv4YaaFEepwuP3u 4eKq6Irag2/nauvQOFbsp3JEqnUQDi6zNqgSBkqFi5uo/UkTRls5u5N2kUfQvy9XrmXS RlH6OyNw+HLXcXgLJmPLYcD0cTBYNA+loOLYXJLFudPnphZYB9fUQ4Swbr9pTTTJH1KC FTm2+gy/YaeLZH9G0GxjgMu1/CbZIYzolAjlDII5yu5N6eDG1Pgo2PN7XEoQZqV6CDsL UeEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=8DYefJEWXn0BGBJkGDS/JH2YcLSeRAj5Qh7Z6VCwugM=; b=PRoT5dqeKRC4ALgO5qfHZOBl3eNDJPDFtvqcNjZOFtkoIGHIeE0qr9wN8Dl8QYh++o 28N+7nIqOzFx94mlM82/S31RsRjIAavc5j3G1nuMNNV3o9HwoXXDCF64RVPpy0ckIdok pOu1vNda5+qTeHDeUk83QIjY3aHcbKP4M8Vb8vhyWGdz36e4eQqJVAktbUh81aio9Mr/ xDXLuq0GFfHKhfoS79hgABQFgDVJadQmTeWZDpHlAIE0wb95QLqlLzj3oph4nkg4OXeg JL9I7xIdT8ySoyrklqyAxufx0NOL0vc35ZdIZnXgRuy4rfmrp/1a7rXzrUqKnu0vwpa3 S0Sw== 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 u8si1445568ple.379.2021.10.27.14.32.16; Wed, 27 Oct 2021 14:32:28 -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 S239937AbhJ0Rtk (ORCPT + 97 others); Wed, 27 Oct 2021 13:49:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235983AbhJ0Rtj (ORCPT ); Wed, 27 Oct 2021 13:49:39 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3498660296; Wed, 27 Oct 2021 17:47:06 +0000 (UTC) Date: Wed, 27 Oct 2021 18:51:33 +0100 From: Jonathan Cameron To: Jishnu Prakash Cc: , , , , , , , , , , , , , , , , , , "Rafael J. Wysocki" , , , , , Subject: Re: [PATCH V2 1/3] dt-bindings: thermal: qcom: add PMIC5 Gen2 ADC_TM bindings Message-ID: <20211027185133.0d7831fc@jic23-huawei> In-Reply-To: <1635264275-12530-2-git-send-email-quic_jprakash@quicinc.com> References: <1635264275-12530-1-git-send-email-quic_jprakash@quicinc.com> <1635264275-12530-2-git-send-email-quic_jprakash@quicinc.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Oct 2021 21:34:33 +0530 Jishnu Prakash wrote: > Add documentation for PMIC5 Gen2 ADC_TM peripheral. > It is used for monitoring ADC channel thresholds for PMIC7-type > PMICs. It is present on PMK8350, like PMIC7 ADC and can be used > to monitor up to 8 ADC channels, from any of the PMIC7 PMICs > on a target, through PBS(Programmable Boot Sequence). > > Signed-off-by: Jishnu Prakash Hi Jishnu, A few comments inline. Thanks, Jonathan > --- > .../bindings/thermal/qcom-spmi-adc-tm5.yaml | 83 +++++++++++++++++++++- > 1 file changed, 81 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml b/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml > index 3ea8c0c..71a05a3 100644 > --- a/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml > +++ b/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml > @@ -10,7 +10,9 @@ maintainers: > > properties: > compatible: > - const: qcom,spmi-adc-tm5 > + enum: > + - qcom,spmi-adc-tm5 > + - qcom,spmi-adc-tm5-gen2 > > reg: > maxItems: 1 > @@ -33,6 +35,7 @@ properties: > qcom,avg-samples: > $ref: /schemas/types.yaml#/definitions/uint32 > description: Number of samples to be used for measurement. > + Not applicable for Gen2 ADC_TM peripheral. Why not use an matching statement to set qcom,avg_samples: false for that compatible rather than relying on the fuzzy nature of a coment. > enum: > - 1 > - 2 > @@ -45,6 +48,7 @@ properties: > $ref: /schemas/types.yaml#/definitions/uint32 > description: This parameter is used to decrease ADC sampling rate. > Quicker measurements can be made by reducing decimation ratio. > + Not applicable for Gen2 ADC_TM peripheral. > enum: > - 250 > - 420 > @@ -93,6 +97,29 @@ patternProperties: > - const: 1 > - enum: [ 1, 3, 4, 6, 20, 8, 10 ] > > + qcom,avg-samples: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Number of samples to be used for measurement. > + This property in child node is applicable only for Gen2 ADC_TM peripheral. > + enum: > + - 1 > + - 2 > + - 4 > + - 8 > + - 16 > + default: 1 > + > + qcom,decimation: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: This parameter is used to decrease ADC sampling rate. > + Quicker measurements can be made by reducing decimation ratio. > + This property in child node is applicable only for Gen2 ADC_TM peripheral. > + enum: > + - 85 > + - 340 > + - 1360 > + default: 1360 > + > required: > - reg > - io-channels > @@ -124,7 +151,7 @@ examples: > #size-cells = <0>; > #io-channel-cells = <1>; > > - /* Other propreties are omitted */ > + /* Other properties are omitted */ Should really be a separate patch, but up to Rob. > conn-therm@4f { > reg = ; > qcom,ratiometric; > @@ -148,4 +175,56 @@ examples: > }; > }; > }; > + > + - | > + #include > + #include > + #include > + spmi_bus { > + #address-cells = <1>; > + #size-cells = <0>; > + pmk8350_vadc: adc@3100 { > + reg = <0x3100>; > + compatible = "qcom,spmi-adc7"; > + #address-cells = <1>; > + #size-cells = <0>; > + #io-channel-cells = <1>; > + > + /* Other properties are omitted */ > + xo-therm@44 { > + reg = ; > + qcom,ratiometric; > + qcom,hw-settle-time = <200>; > + }; > + > + conn-therm@47 { > + reg = ; > + qcom,ratiometric; > + qcom,hw-settle-time = <200>; > + }; > + }; > + > + pmk8350_adc_tm: adc-tm@3400 { > + compatible = "qcom,spmi-adc-tm5-gen2"; > + reg = <0x3400>; > + interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; > + #thermal-sensor-cells = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + pmk8350-xo-therm@0 { > + reg = <0>; > + io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>; > + qcom,ratiometric; > + qcom,hw-settle-time-us = <200>; Perhaps include the new properties you are defining in the example? > + }; > + > + conn-therm@1 { > + reg = <1>; > + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU>; > + qcom,ratiometric; > + qcom,hw-settle-time-us = <200>; > + }; > + }; > + }; > ...