diff mbox series

[v1,1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor

Message ID 20240328133802.15651-2-ddrokosov@salutedevices.com (mailing list archive)
State New, archived
Headers show
Series thermal: amlogic: introduce A1 SoC family Thermal Sensor controller | expand

Commit Message

Dmitry Rokosov March 28, 2024, 1:37 p.m. UTC
Provide right compatible properties for Amlogic A1 Thermal Sensor
controller. A1 family supports only one thermal node - CPU thermal
sensor.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

Comments

Neil Armstrong March 28, 2024, 2:07 p.m. UTC | #1
Hi,

On 28/03/2024 14:37, Dmitry Rokosov wrote:
> Provide right compatible properties for Amlogic A1 Thermal Sensor
> controller. A1 family supports only one thermal node - CPU thermal
> sensor.
> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> ---
>   .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> index 20f8f9b3b971..0e7f6568d385 100644
> --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> @@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
>   
>   properties:
>     compatible:
> -    items:
> -      - enum:
> -          - amlogic,g12a-cpu-thermal
> -          - amlogic,g12a-ddr-thermal
> -      - const: amlogic,g12a-thermal
> +    oneOf:
> +      - items:
> +          - enum:
> +              - amlogic,g12a-cpu-thermal
> +              - amlogic,g12a-ddr-thermal
> +          - const: amlogic,g12a-thermal
> +      - items:
> +          - const: amlogic,a1-cpu-thermal
> +          - const: amlogic,a1-thermal

In this case you can just use "amlogic,a1-cpu-thermal" or "amlogic,a1-thermal", no need for a fallback.

Thanks,
Neil

>   
>     reg:
>       maxItems: 1
Dmitry Rokosov March 28, 2024, 2:29 p.m. UTC | #2
Hello Neil,

Thank you for quick feedback.

On Thu, Mar 28, 2024 at 03:07:52PM +0100, neil.armstrong@linaro.org wrote:
> Hi,
> 
> On 28/03/2024 14:37, Dmitry Rokosov wrote:
> > Provide right compatible properties for Amlogic A1 Thermal Sensor
> > controller. A1 family supports only one thermal node - CPU thermal
> > sensor.
> > 
> > Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> > ---
> >   .../bindings/thermal/amlogic,thermal.yaml          | 14 +++++++++-----
> >   1 file changed, 9 insertions(+), 5 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > index 20f8f9b3b971..0e7f6568d385 100644
> > --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> > @@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal
> >   properties:
> >     compatible:
> > -    items:
> > -      - enum:
> > -          - amlogic,g12a-cpu-thermal
> > -          - amlogic,g12a-ddr-thermal
> > -      - const: amlogic,g12a-thermal
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - amlogic,g12a-cpu-thermal
> > +              - amlogic,g12a-ddr-thermal
> > +          - const: amlogic,g12a-thermal
> > +      - items:
> > +          - const: amlogic,a1-cpu-thermal
> > +          - const: amlogic,a1-thermal
> 
> In this case you can just use "amlogic,a1-cpu-thermal" or "amlogic,a1-thermal", no need for a fallback.

Okay, I will send v2 with only one compatible w/o fallback.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
index 20f8f9b3b971..0e7f6568d385 100644
--- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
@@ -13,11 +13,15 @@  description: Binding for Amlogic Thermal
 
 properties:
   compatible:
-    items:
-      - enum:
-          - amlogic,g12a-cpu-thermal
-          - amlogic,g12a-ddr-thermal
-      - const: amlogic,g12a-thermal
+    oneOf:
+      - items:
+          - enum:
+              - amlogic,g12a-cpu-thermal
+              - amlogic,g12a-ddr-thermal
+          - const: amlogic,g12a-thermal
+      - items:
+          - const: amlogic,a1-cpu-thermal
+          - const: amlogic,a1-thermal
 
   reg:
     maxItems: 1