Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3214904rdb; Thu, 16 Nov 2023 03:43:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzEit0ZKI5t3HUPvy/tmlw+jWmkduWvjEaIh8fQ3rB/XcEtgon///aww+vNNV3xSX9RMNo X-Received: by 2002:a05:6a00:98c:b0:6c0:3e5e:1d46 with SMTP id u12-20020a056a00098c00b006c03e5e1d46mr17719809pfg.21.1700135025703; Thu, 16 Nov 2023 03:43:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700135025; cv=none; d=google.com; s=arc-20160816; b=JcUiPjMzOGeHTzXdA10SIX/Euw8rUcLX5n/8oCG6eH4x36/78/RFcBkGjM+c0c2C62 DpwD/VVwrNy60/WnjfGfcB2kGp8TCfnqzm7l5QOkSIOF08ZNdlqh1XJNlFS83Wnq9CFB y5WHAISoTIZM974yJzc4foBVLkXWrq5cMvpK9IWCOhQbBPqbbYJdsL80TAVsEotuhl+0 L3NlgECXauZbUmBNiWdulysJ+X4e+KrcYu6wL1Jr1wm4hG0d13XR0Y/6d5gntP5QpFeB BIiutyC9oBhLP/Rwyze4yW8QwqJTpC/HaEGeHRiZINi7DsYOnp6BVO3JL42tv8CYf1WR 5C9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=Zu99ZgJ4o++Kc5jXeErXKR/5BDUaWqse/nPXLryIj8o=; fh=YSaaOjoO5L77m7x6X5YjPvTAQeMPYyJZ16fHFhVClJw=; b=Z3EwPYwMGbG5D1mZM308DkuIgUlYzAMGgNY5lLqF3WZXEG4/W4Oz/hnrrKJrGVQsWg ycQD3vR7UNiVFbTbEqLW+vRzxdllh3S2N8ah+YtWu1Tu3v9rFtHZ+SUQZNgRQjDrbC11 VjgEu/g6Q/DMGuxJXglursyrF8liK3su/pHZo0ZOIEsbpyVDlKf4K6sOHaRDR6minlRm MpmdZ6oZrj0k9gxu1C4+2CHQtdgejSco9r3Db/1SiUCofHA7RQ3mPSL/fC7ldPASaJj1 Q6oUBv4SEthsfpEA3JPgIcr4obzZCYtTcYdzTo3V2yYkv0A5XkzZyeCC+Y4PSY8yIcZR Ou9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y+sPBUq+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bs65-20020a632844000000b005be0087d48bsi11657960pgb.529.2023.11.16.03.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 03:43:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y+sPBUq+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id F029280D6A2C; Thu, 16 Nov 2023 03:43:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345066AbjKPLnb (ORCPT + 99 others); Thu, 16 Nov 2023 06:43:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbjKPLna (ORCPT ); Thu, 16 Nov 2023 06:43:30 -0500 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07C8CCE for ; Thu, 16 Nov 2023 03:43:27 -0800 (PST) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1eb6c559ab4so330685fac.0 for ; Thu, 16 Nov 2023 03:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700135006; x=1700739806; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Zu99ZgJ4o++Kc5jXeErXKR/5BDUaWqse/nPXLryIj8o=; b=y+sPBUq+mwlp0VuGsDOHKis090t9QwhmMjT7jeF0z1093yct26nffcP/gNavnP0zTg IsF/4HL6+FHqNZKfqgOeejdDGuUe98LheAu6nCM/txMwMLT+mEjQ4Z182SXx7VSXGCU9 iiXPwgAUeJ7PAwrTSU5893fIMWIVCFqnXctlpcyO5LgmFIce6dpn0eEZtO4T1KFpI+YZ KJjplpz3RTHbLfU+PsbEyLEiJQKtrYoPj2Aj5g+k98WGe07J2BBsOH8y0kCWcpyQgncf R+dcmYXu48vY7XErq3RtPwzmDmJJ/CrhvqUPTS0RtnMr97iOXi5XIE4w/aZWSpAdtmFw sqKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700135006; x=1700739806; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Zu99ZgJ4o++Kc5jXeErXKR/5BDUaWqse/nPXLryIj8o=; b=NZPu0PEDdehgNR7lLdBuAXLtWCV3jgjIdzzVlDbLKkpyQU0PyvrL7kMJe/Q+PW5BYh 9SPObPXT0kuym/MG2YN5hbTNYkbqc7pjvbgNR7Xxvbr+uv0CrdsLP9SFW3fiGPmXCIA2 7ftf6j6u7FjeRRZFA2vYdUUtmzb8gfv/Bf1iMKcOSn/TBKzpJy3E01dNTF5nwbH13iSS JmPAinVH6uq309b2wB6Ic0ZqjnntDvalOiJldAHR0mbz35/fn36/uPHqMUI+QNTngANP A1H3yXAmAwn7DigP8y3TzvQyaibTNpV4SVSV7jKo2GUVfNYc+huTj4SSvz68eI1JMjvw u+Cw== X-Gm-Message-State: AOJu0Yxz4mFelSuo3i3k2LJTJuCMsKM8L7wN4PPa4MBuVMC/xgIawQci HY/o8Qddrhx4yD7iIiz1y2LPuw== X-Received: by 2002:a05:6870:3c09:b0:1ea:406:4dff with SMTP id gk9-20020a0568703c0900b001ea04064dffmr19861258oab.50.1700135006354; Thu, 16 Nov 2023 03:43:26 -0800 (PST) Received: from [192.168.212.13] ([12.191.197.195]) by smtp.gmail.com with ESMTPSA id az36-20020a05620a172400b0077580becd52sm4193397qkb.103.2023.11.16.03.43.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Nov 2023 03:43:25 -0800 (PST) Message-ID: <832053f4-bd5d-4e58-81bb-1a8188e7f364@linaro.org> Date: Thu, 16 Nov 2023 12:43:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2 1/3] dt-bindings: iio: adc: Add QCOM PMIC5 Gen3 ADC bindings Content-Language: en-US To: Jishnu Prakash , jic23@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, daniel.lezcano@linaro.org, dmitry.baryshkov@linaro.org, linus.walleij@linaro.org, linux-arm-msm@vger.kernel.org, andriy.shevchenko@linux.intel.com, quic_subbaram@quicinc.com, quic_collinsd@quicinc.com, quic_amelende@quicinc.com, quic_kamalw@quicinc.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, marijn.suijten@somainline.org Cc: lars@metafoo.de, luca@z3ntu.xyz, linux-iio@vger.kernel.org, lee@kernel.org, rafael@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, cros-qcom-dts-watchers@chromium.org, sboyd@kernel.org, linux-pm@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org, kernel@quicinc.com References: <20231116032530.753192-1-quic_jprakash@quicinc.com> <20231116032530.753192-2-quic_jprakash@quicinc.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5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Lo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20231116032530.753192-2-quic_jprakash@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 03:43:43 -0800 (PST) On 16/11/2023 04:25, Jishnu Prakash wrote: > For the PMIC5-Gen3 type PMICs, ADC peripheral is present in HW for the > following PMICs: PMK8550, PM8550, PM8550B and PM8550VX PMICs. > A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. > It is similar to PMIC5-Gen2, with SW communication to ADCs on all PMICs > going through PBS(Programmable Boot Sequence) firmware through a single > register interface. This interface is implemented on an SDAM (Shared > Direct Access Memory) peripheral on the master PMIC PMK8550 rather > than a dedicated ADC peripheral. > > Add documentation for PMIC5 Gen3 ADC and macro definitions for ADC > channels and virtual channels (combination of ADC channel number and > PMIC SID number) per PMIC, to be used by clients of this device. > > Changes since v1: > - Updated properties separately for all compatibles to clarify usage > of new properties and updates in usage of old properties for ADC5 Gen3. > - Avoided updating 'adc7' name to 'adc5 gen2' and just left a comment > mentioning this convention. > - Used predefined channel IDs in individual PMIC channel definitions > instead of numeric IDs. > - Addressed other comments from reviewers. > > Co-developed-by: Anjelique Melendez > Signed-off-by: Anjelique Melendez > Signed-off-by: Jishnu Prakash > --- > .../bindings/iio/adc/qcom,spmi-vadc.yaml | 181 ++++++++++++++++-- > .../iio/adc/qcom,spmi-adc5-gen3-pm8550.h | 50 +++++ > .../iio/adc/qcom,spmi-adc5-gen3-pm8550b.h | 89 +++++++++ > .../iio/adc/qcom,spmi-adc5-gen3-pm8550vx.h | 22 +++ > .../iio/adc/qcom,spmi-adc5-gen3-pmk8550.h | 56 ++++++ > include/dt-bindings/iio/qcom,spmi-vadc.h | 81 ++++++++ > 6 files changed, 464 insertions(+), 15 deletions(-) > create mode 100644 include/dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pm8550.h > create mode 100644 include/dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pm8550b.h > create mode 100644 include/dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pm8550vx.h > create mode 100644 include/dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pmk8550.h > > diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml > index ad7d6fc49de5..c988bd74a247 100644 > --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml > @@ -13,8 +13,10 @@ maintainers: > description: | > SPMI PMIC voltage ADC (VADC) provides interface to clients to read > voltage. The VADC is a 15-bit sigma-delta ADC. > - SPMI PMIC5/PMIC7 voltage ADC (ADC) provides interface to clients to read > - voltage. The VADC is a 16-bit sigma-delta ADC. > + SPMI PMIC5/PMIC7/PMIC5 Gen3 voltage ADC (ADC) provides interface to > + clients to read voltage. The VADC is a 16-bit sigma-delta ADC. > + Note that PMIC7 ADC is the generation between PMIC5 and PMIC5 Gen3 ADC, > + it can be considered like PMIC5 Gen2. > > properties: > compatible: > @@ -23,14 +25,18 @@ properties: > - const: qcom,pms405-adc > - const: qcom,spmi-adc-rev2 > - enum: > - - qcom,spmi-vadc > - - qcom,spmi-adc5 > - qcom,spmi-adc-rev2 > + - qcom,spmi-adc5 > + - qcom,spmi-adc5-gen3 > - qcom,spmi-adc7 > + - qcom,spmi-vadc > > reg: > - description: VADC base address in the SPMI PMIC register map > - maxItems: 1 NAK. I wrote it multiple times. You canno remove the widest constraints from top-level property. > + description: | > + - For compatible properties "qcom,spmi-vadc", "qcom,spmi-adc5", "qcom,spmi-adc-rev2" > + and "qcom,spmi-adc7", reg is the VADC base address in the SPMI PMIC register map. > + - For compatible property "qcom,spmi-adc5-gen3", each reg corresponds > + to an SDAM peripheral base address that is being used for ADC. > > '#address-cells': > const: 1 > @@ -38,13 +44,26 @@ properties: > '#size-cells': > const: 0 > > + "#thermal-sensor-cells": > + const: 1 > + description: > + Number of cells required to uniquely identify the thermal sensors. Since > + we have multiple sensors this is set to 1. For compatible property > + "qcom,spmi-adc5-gen3", this property is required for ADC_TM device. > + > '#io-channel-cells': > const: 1 > > interrupts: > - maxItems: 1 No, srsly. We went through it. > - description: > + description: | > End of conversion interrupt. > + - For compatible property "qcom,spmi-adc5-gen3", interrupts are defined > + for each SDAM being used. > + > + interrupt-names: > + description: | You must describe the names which also provides constraints. I am not going to review the rest of the file. Best regards, Krzysztof