From: Jishnu Prakash <quic_jprakash@quicinc.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
<jic23@kernel.org>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
<andersson@kernel.org>, <konrad.dybcio@linaro.org>,
<lee@kernel.org>, <andriy.shevchenko@linux.intel.com>,
<daniel.lezcano@linaro.org>, <dmitry.baryshkov@linaro.org>
Cc: <lars@metafoo.de>, <luca@z3ntu.xyz>,
<marijn.suijten@somainline.org>, <agross@kernel.org>,
<sboyd@kernel.org>, <rafael@kernel.org>, <rui.zhang@intel.com>,
<lukasz.luba@arm.com>, <linus.walleij@linaro.org>,
<quic_subbaram@quicinc.com>, <quic_collinsd@quicinc.com>,
<quic_amelende@quicinc.com>, <quic_kamalw@quicinc.com>,
<kernel@quicinc.com>, <linux-kernel@vger.kernel.org>,
<linux-arm-msm@vger.kernel.org>,
<linux-arm-msm-owner@vger.kernel.org>,
<linux-iio@vger.kernel.org>, <linux-pm@vger.kernel.org>,
<devicetree@vger.kernel.org>,
<cros-qcom-dts-watchers@chromium.org>
Subject: Re: [PATCH v3 2/3] dt-bindings: iio: adc: Add support for QCOM PMIC5 Gen3 ADC
Date: Fri, 16 Feb 2024 17:14:11 +0530 [thread overview]
Message-ID: <d2f2cb91-983f-48e4-b53a-8af2cd87f3d2@quicinc.com> (raw)
In-Reply-To: <3f812ffa-ec33-448e-b72a-ce698618a8c1@linaro.org>
Hi Krzysztof,
(Resending this mail for tracking on mailing lists, as it got rejected
from lists the first time due to HTML)
On 1/4/2024 1:48 PM, Krzysztof Kozlowski wrote:
> On 31/12/2023 18:12, 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.
>>
>> 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 v2:
>> - Moved ADC5 Gen3 documentation into a separate new file.
>
> Changelog goes under ---.
>
> Why did you do this? What is the rationale? Sorry, this patchset goes
> nowhere.
I'll elaborate this more in the next patchset. There are two main
reasons for adding this documentation in a new file:
1.This device is not exactly like the existing QCOM VADC drivers as it
now combines VADC functionality (reading ADC channel on client request)
with ADC_TM functionality (thermal threshold monitoring).
2.Adding this device's bindings in the existing qcom,spmi-vadc.yaml file
is not possible as it would require updating some of the existing
top-level constraints. (for the older devices in that file, "reg" and
"interrupts" can have at most one item, while this device can have more
than one item under these properties.)
>
>>
>> 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.
>>
>> + per PMIC in the PMIC-specific files in include/dt-bindings/iio/adc.
>> +
>> + label:
>> + $ref: /schemas/types.yaml#/definitions/string
>
> Why do you need it in the first place? Don't you miss some $ref?
This is just meant to show the ADC channel name in DT for our reference.
I'll check if I can use adc.yaml, which includes this property already,
as a reference in this case.
>
>> + description: |
>
> Do not need '|' unless you need to preserve formatting. Applies everywhere.
>
>
>
>> + ADC input of the platform as seen in the schematics.
>> + For thermistor inputs connected to generic AMUX or GPIO inputs
>> + these can vary across platform for the same pins. Hence select
>> + the platform schematics name for this channel.
>> +
>> +
>> + qcom,adc-tm:
>> + description: |
>> + Indicates if ADC_TM monitoring is done on this channel.
>> + Defined for compatible property "qcom,spmi-adc5-gen3".
>> + This is the same functionality as in the existing QCOM ADC_TM
>> + device, documented at devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml.
>> + type: boolean
>> +
>
> Why do you duplicate entire vadc file? Why it cannot be part of that
> file? Oh wait, it was in v2.
>
> You now duplicated a lot of property definitions without clear reason.
> If this is intention, then you need to put them in common schema.
Many of the properties used for earlier QCOM VADC devices will be used
for this device too.....do you mean I can add a new schema file (named
something like qcom,vadc.yaml) and move common properties into it (like
qcom,hw-settle-time, qcom,decimation, etc) from this file and
qcom,spmi-vadc.yaml?
Dmitry suggests doing it in a separate patch, I'll follow his suggestion
if there's no issue.
>> diff --git a/include/dt-bindings/iio/adc/qcom,spmi-adc7-smb139x.h b/include/dt-bindings/iio/adc/qcom,spmi-adc7-smb139x.h
>> index c0680d1285cf..750a526af2c1 100644
>> --- a/include/dt-bindings/iio/adc/qcom,spmi-adc7-smb139x.h
>> +++ b/include/dt-bindings/iio/adc/qcom,spmi-adc7-smb139x.h
>> @@ -6,7 +6,7 @@
>> #ifndef _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
>> #define _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
>>
>> -#include <dt-bindings/iio/qcom,spmi-vadc.h>
>> +#include <dt-bindings/iio/adc/qcom,spmi-vadc.h>
>
> ? How is it related?
This should have gone into patch 1, I'll fix it in the next patch series.
I'll address all your other comments in the next patchset.
Thanks,
Jishnu
>
>>
>> #define SMB139x_1_ADC7_SMB_TEMP (SMB139x_1_SID << 8 | ADC7_SMB_TEMP)
>> #define SMB139x_1_ADC7_ICHG_SMB (SMB139x_1_SID << 8 | ADC7_ICHG_SMB)
>> diff --git a/include/dt-bindings/iio/adc/qcom,spmi-vadc.h b/include/dt-bindings/iio/adc/qcom,spmi-vadc.h
>> index ef07ecd4d585..cfe653d945a4 100644
>> --- a/include/dt-bindings/iio/adc/qcom,spmi-vadc.h
>> +++ b/include/dt-bindings/iio/adc/qcom,spmi-vadc.h
>> @@ -1,6 +1,8 @@
>> /* SPDX-License-Identifier: GPL-2.0 */
>> /*
>> * Copyright (c) 2012-2014,2018,2020 The Linux Foundation. All rights reserved.
>> + *
>
> Drop stray blank line
>
> Best regards,
> Krzysztof
>
next prev parent reply other threads:[~2024-02-16 11:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-31 17:12 [PATCH v3 0/3] iio: adc: Add support for QCOM SPMI PMIC5 Gen3 ADC Jishnu Prakash
2023-12-31 17:12 ` [PATCH v3 1/3] dt-bindings: iio/adc: Move QCOM ADC bindings to iio/adc folder Jishnu Prakash
2024-01-01 10:35 ` kernel test robot
2024-01-04 8:08 ` Krzysztof Kozlowski
2023-12-31 17:12 ` [PATCH v3 2/3] dt-bindings: iio: adc: Add support for QCOM PMIC5 Gen3 ADC Jishnu Prakash
2023-12-31 17:41 ` Dmitry Baryshkov
2024-01-01 18:02 ` Jonathan Cameron
2024-02-16 10:39 ` Jishnu Prakash
2024-02-16 13:45 ` Jonathan Cameron
2024-01-04 8:18 ` Krzysztof Kozlowski
2024-02-16 11:44 ` Jishnu Prakash [this message]
2024-02-17 14:15 ` Krzysztof Kozlowski
[not found] ` <13f2b558-a50d-44d3-85de-38e230212732@quicinc.com>
2024-02-16 10:48 ` Dmitry Baryshkov
2024-02-16 11:18 ` Jishnu Prakash
2024-02-17 14:13 ` Krzysztof Kozlowski
2024-02-21 5:36 ` Jishnu Prakash
2024-02-21 7:19 ` Krzysztof Kozlowski
2024-03-14 8:28 ` Jishnu Prakash
2024-03-14 8:36 ` Krzysztof Kozlowski
2023-12-31 17:12 ` [PATCH v3 3/3] " Jishnu Prakash
2023-12-31 17:46 ` Dmitry Baryshkov
2024-02-14 13:58 ` Jishnu Prakash
2024-02-16 10:52 ` Dmitry Baryshkov
2023-12-31 19:54 ` kernel test robot
2024-01-01 17:54 ` Jonathan Cameron
2024-02-16 11:44 ` Jishnu Prakash
[not found] ` <b02f20fd-c682-4b47-8d61-1d0e2adbdd57@quicinc.com>
2024-02-16 13:54 ` Jonathan Cameron
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=d2f2cb91-983f-48e4-b53a-8af2cd87f3d2@quicinc.com \
--to=quic_jprakash@quicinc.com \
--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=krzysztof.kozlowski@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_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