linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Binbin Zhou <zhoubb.aaron@gmail.com>
To: Conor Dooley <conor@kernel.org>
Cc: Binbin Zhou <zhoubinbin@loongson.cn>,
	Huacai Chen <chenhuacai@loongson.cn>,
	 "Rafael J . Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	 Amit Kucheria <amitk@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>, Rob Herring <robh+dt@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Huacai Chen <chenhuacai@kernel.org>,
	loongson-kernel@lists.loongnix.cn,  linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org,  Yinbo Zhu <zhuyinbo@loongson.cn>,
	WANG Xuerui <git@xen0n.name>,
	loongarch@lists.linux.dev
Subject: Re: [PATCH 3/4] dt-bindings: thermal: loongson,ls2k-thermal: Fix incorrect compatible definition
Date: Wed, 10 Apr 2024 19:50:52 +0800	[thread overview]
Message-ID: <CAMpQs4KSJB3wksDO2TJA1HSMuEW2=r13UtXbvZPFkKAPhvBdvg@mail.gmail.com> (raw)
In-Reply-To: <20240410-wrecker-procreate-11e0915f7bbd@spud>

On Wed, Apr 10, 2024 at 6:00 PM Conor Dooley <conor@kernel.org> wrote:
>
> On Wed, Apr 10, 2024 at 05:49:02PM +0800, Binbin Zhou wrote:
> > The temperature output register of the Loongson-2K2000 is defined in the
> > chip configuration domain, which is different from the Loongson-2K1000,
> > so it can't be fallbacked.
> >
> > We need to use two groups of registers to describe it: the first group
> > is the high and low temperature threshold setting register; the second
> > group is the temperature output register.
> >
> > It is true that this fix will cause ABI corruption, but it is necessary
> > otherwise the Loongson-2K2000 temperature sensor will not work properly.
> >
> > Fixes: 72684d99a854 ("thermal: dt-bindings: add loongson-2 thermal")
> > Cc: Yinbo Zhu <zhuyinbo@loongson.cn>
> > Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> > ---
> >  .../thermal/loongson,ls2k-thermal.yaml        | 22 +++++++++++++++++--
> >  1 file changed, 20 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml b/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml
> > index 9748a479dcd4..a25b42702788 100644
> > --- a/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml
> > +++ b/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml
> > @@ -18,14 +18,15 @@ properties:
> >      oneOf:
> >        - enum:
> >            - loongson,ls2k1000-thermal
> > +          - loongson,ls2k2000-thermal
> >        - items:
> >            - enum:
> >                - loongson,ls2k0500-thermal
> > -              - loongson,ls2k2000-thermal
> >            - const: loongson,ls2k1000-thermal
> >
> >    reg:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
> >
> >    interrupts:
> >      maxItems: 1
> > @@ -41,6 +42,23 @@ required:
> >
> >  unevaluatedProperties: false
> >
> > +if:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        enum:
> > +          - loongson,ls2k2000-thermal
> > +
> > +then:
> > +  properties:
> > +    reg:
> > +      maxItems: 2
>
> You need a minItems: 2 here also, so that providing only the original
> reg is not allowed anymore.

Hi Conor:

Indeed, it is necessary that the whole description is more rigorous.
I'll fix it in the next version.

Thanks.
Binbin
>
> Cheers,
> Conor.
>
> > +
> > +else:
> > +  properties:
> > +    reg:
> > +      maxItems: 1
> > +
> >  examples:
> >    - |
> >      #include <dt-bindings/interrupt-controller/irq.h>
> > --
> > 2.43.0
> >

  reply	other threads:[~2024-04-10 11:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10  9:48 [PATCH 0/4] thermal: loongson2: Add Loongson-2K0500 and Loongson-2K2000 thermal support Binbin Zhou
2024-04-10  9:49 ` [PATCH 1/4] thermal: loongson2: Trivial code style adjustment Binbin Zhou
2024-04-10  9:49 ` [PATCH 2/4] dt-bindings: thermal: loongson,ls2k-thermal: Add Loongson-2K0500 compaible Binbin Zhou
2024-04-10 20:23   ` Rob Herring
2024-04-10  9:49 ` [PATCH 3/4] dt-bindings: thermal: loongson,ls2k-thermal: Fix incorrect compatible definition Binbin Zhou
2024-04-10  9:59   ` Conor Dooley
2024-04-10 11:50     ` Binbin Zhou [this message]
2024-04-10  9:49 ` [PATCH 4/4] thermal: loongson2: Add Loongson-2K2000 support Binbin Zhou

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='CAMpQs4KSJB3wksDO2TJA1HSMuEW2=r13UtXbvZPFkKAPhvBdvg@mail.gmail.com' \
    --to=zhoubb.aaron@gmail.com \
    --cc=amitk@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=git@xen0n.name \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=zhoubinbin@loongson.cn \
    --cc=zhuyinbo@loongson.cn \
    /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;
as well as URLs for NNTP newsgroup(s).