From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Jishnu Prakash <quic_jprakash@quicinc.com>,
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
Subject: Re: [PATCH V2 1/3] dt-bindings: iio: adc: Add QCOM PMIC5 Gen3 ADC bindings
Date: Thu, 16 Nov 2023 12:43:19 +0100 [thread overview]
Message-ID: <832053f4-bd5d-4e58-81bb-1a8188e7f364@linaro.org> (raw)
In-Reply-To: <20231116032530.753192-2-quic_jprakash@quicinc.com>
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 <quic_amelende@quicinc.com>
> Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
> Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
> ---
> .../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
next prev parent reply other threads:[~2023-11-16 11:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 3:25 [PATCH V2 0/3] iio: adc: Add support for QCOM SPMI PMIC5 Gen3 ADC Jishnu Prakash
2023-11-16 3:25 ` [PATCH V2 1/3] dt-bindings: iio: adc: Add QCOM PMIC5 Gen3 ADC bindings Jishnu Prakash
2023-11-16 11:43 ` Krzysztof Kozlowski [this message]
2023-12-21 8:00 ` Jishnu Prakash
2023-12-21 8:04 ` Krzysztof Kozlowski
2023-11-16 5:22 ` [PATCH V2 0/3] iio: adc: Add support for QCOM SPMI PMIC5 Gen3 ADC Dmitry Baryshkov
2023-11-16 6:29 ` Jishnu Prakash
2023-11-16 6:58 ` Dmitry Baryshkov
2023-11-25 19:35 ` Jonathan Cameron
2023-11-20 11:31 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=832053f4-bd5d-4e58-81bb-1a8188e7f364@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=jic23@kernel.org \
--cc=kernel@quicinc.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm-owner@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=luca@z3ntu.xyz \
--cc=lukasz.luba@arm.com \
--cc=marijn.suijten@somainline.org \
--cc=quic_amelende@quicinc.com \
--cc=quic_collinsd@quicinc.com \
--cc=quic_jprakash@quicinc.com \
--cc=quic_kamalw@quicinc.com \
--cc=quic_subbaram@quicinc.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox