public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Amit Kucheria <amit.kucheria@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Rajendra Nayak <rnayak@codeaurora.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Eduardo Valentin <edubezval@gmail.com>,
	smohanad@codeaurora.org,
	Vivek Gautam <vivek.gautam@codeaurora.org>,
	Andy Gross <andy.gross@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Kees Cook <keescook@chromium.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH v4 4/6] thermal: tsens: Add support for SDM845
Date: Thu, 5 Jul 2018 14:37:12 -0600	[thread overview]
Message-ID: <20180705203712.GA29531@rob-hp-laptop> (raw)
In-Reply-To: <CAHLCerNpifvM9nGXiE63-DQ0okP8+1wdxq52qo-K1TWzoYzjtQ@mail.gmail.com>

On Wed, Jul 04, 2018 at 10:56:26PM +0530, Amit Kucheria wrote:
> On Tue, Jul 3, 2018 at 9:56 PM, Rob Herring <robh@kernel.org> wrote:
> > On Mon, Jul 02, 2018 at 06:14:07PM +0530, Amit Kucheria wrote:
> >> SDM845 uses v2.4.0 of the TSENS IP block but the get_temp() function
> >> appears to be identical across v2.x.y in code seen so far. We use the
> >> generic get_temp() function.
> >>
> >> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> >> ---
> >>  Documentation/devicetree/bindings/thermal/qcom-tsens.txt | 2 ++
> >>  drivers/thermal/qcom/tsens-v2.c                          | 6 +++++-
> >>  drivers/thermal/qcom/tsens.c                             | 6 ++++++
> >>  drivers/thermal/qcom/tsens.h                             | 5 ++++-
> >>  4 files changed, 17 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt
> >> index 06195e8..075182e 100644
> >> --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt
> >> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt
> >> @@ -5,6 +5,8 @@ Required properties:
> >>   - "qcom,msm8916-tsens" : For 8916 Family of SoCs
> >>   - "qcom,msm8974-tsens" : For 8974 Family of SoCs
> >>   - "qcom,msm8996-tsens" : For 8996 Family of SoCs
> >> + - "qcom,tsens-v2.4.0"  : For SDM845 Family of SoCs
> >> + - "qcom,tsens-v2"      : Generic fallback binding for any Soc using 2.x.y version of the tsens IP
> >
> > You need to show what are valid combinations of compatibles. Does v2
> > apply to 8996? One valid combination per line.
> 
> I've restructured qcom-tsens.txt to look like this:
> 
> -----%<-------
> 
> * QCOM SoC Temperature Sensor (TSENS)
> 
> Required properties:
> - compatible: must be one of the following:
>     - "qcom,msm8916-tsens" (MSM8916)
>     - "qcom,msm8974-tsens" (MSM8974)
>     - "qcom,msm8996-tsens" (MSM8996)
>     - "qcom,tsens-<ip_version>", "qcom,tsens-v2" (TSENS IP version and a
>        generic v2 property as fallback except for MSM8996)
> 
>   Examples with ip_version are:
>     - "qcom,tsens-v2.4.0", "qcom,tsens-v2" (SDM845)
>     - "qcom,tsens-v2.2.1", "qcom,tsens-v2" (MSM8998)
> 
> -----%<-------
> 
> 8996 would end up being something like this if needed, though we're
> stuck with "qcom,msm8996-tsens":
> "qcom,msm8996-tsens", "qcom,tsens-v2.1.0", "qcom,tsens-v2" (MSM8996)

3 versions here for 3 SoCs. I'm not getting that convinced version 
numbers really are better. I would assume that other QCom IP blocks 
have versions too, but pretty much *every* *other* binding uses SoC names. 
Why is this one special? The other problem with versions is the mapping 
of versions to SoCs most likely can't be validated outside of QCom 
unless there's a version register.

So, sorry to go in circles, but can you go back to qcom,<soc>-tsens. You 
can keep qcom,tsens-v2 as a fallback.

Yes, it's annoying to have to update bindings for new SoCs. But it's 
trivial one line patches. Look at Renesas bindings. Maybe adding new 
ones will be scriptable once we move to json-schema binding docs.

Rob

  reply	other threads:[~2018-07-05 20:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02 12:44 [PATCH v4 0/6] thermal: tsens: Refactoring for TSENSv2 IP Amit Kucheria
2018-07-02 12:44 ` [PATCH v4 2/6] dt: qcom: 8996: thermal: Move to DT initialisation Amit Kucheria
2018-07-02 18:48   ` Bjorn Andersson
2018-07-02 12:44 ` [PATCH v4 4/6] thermal: tsens: Add support for SDM845 Amit Kucheria
2018-07-02 18:51   ` Bjorn Andersson
2018-07-03 16:26   ` Rob Herring
2018-07-04 17:26     ` Amit Kucheria
2018-07-05 20:37       ` Rob Herring [this message]
2018-07-06  5:13         ` Amit Kucheria
2018-07-06 17:47           ` Rob Herring
2018-07-02 12:44 ` [PATCH v4 6/6] arm64: dts: sdm845: Add tsens nodes Amit Kucheria
2018-07-02 18:50   ` Bjorn Andersson
2018-07-03 21:48   ` Matthias Kaehlcke
2018-07-09 11:26     ` Amit Kucheria
2018-07-09 16:01       ` Matthias Kaehlcke
2018-07-09 16:04         ` Amit Kucheria
2018-07-09 16:10           ` Matthias Kaehlcke
2018-07-06 17:31   ` Stephen Boyd
2018-07-09 11:27     ` Amit Kucheria
2018-07-02 14:00 ` [PATCH v4 0/6] thermal: tsens: Refactoring for TSENSv2 IP Amit Kucheria
2018-07-02 17:53 ` Eduardo Valentin
2018-07-09 11:30   ` Amit Kucheria

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=20180705203712.GA29531@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=amit.kucheria@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=rnayak@codeaurora.org \
    --cc=rui.zhang@intel.com \
    --cc=smohanad@codeaurora.org \
    --cc=vivek.gautam@codeaurora.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