[PATCH v2 1/2] dt-bindings: hwmon: Add AST2700 compatible

Billy Tsai posted 2 patches 1 week, 6 days ago
There is a newer version of this series
[PATCH v2 1/2] dt-bindings: hwmon: Add AST2700 compatible
Posted by Billy Tsai 1 week, 6 days ago
Adds support for the AST2700 PWM/Tach controller by extending the
compatible string enumeration in the device tree binding.

The AST2700 PWM/Tach hardware is compatible with the existing binding
schema and requires no additional properties or modifications beyond
the new compatible string.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
 .../devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml          | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml b/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml
index 9e5ed901ae54..8b579321915f 100644
--- a/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml
+++ b/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml
@@ -18,9 +18,13 @@ description: |
 
 properties:
   compatible:
-    enum:
-      - aspeed,ast2600-pwm-tach
-
+    oneOf:
+      # AST2700 with fallback to AST2600
+      - items:
+          - const: aspeed,ast2700-pwm-tach
+          - const: aspeed,ast2600-pwm-tach
+      # Only AST2600
+      - const: aspeed,ast2600-pwm-tach
   reg:
     maxItems: 1
 

-- 
2.34.1
Re: [PATCH v2 1/2] dt-bindings: hwmon: Add AST2700 compatible
Posted by Krzysztof Kozlowski 1 week, 5 days ago
On Tue, Nov 18, 2025 at 05:11:53PM +0800, Billy Tsai wrote:
> Adds support for the AST2700 PWM/Tach controller by extending the
> compatible string enumeration in the device tree binding.
> 
> The AST2700 PWM/Tach hardware is compatible with the existing binding
> schema and requires no additional properties or modifications beyond
> the new compatible string.
> 
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
> ---
>  .../devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml          | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml b/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml
> index 9e5ed901ae54..8b579321915f 100644
> --- a/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml
> @@ -18,9 +18,13 @@ description: |
>  
>  properties:
>    compatible:
> -    enum:
> -      - aspeed,ast2600-pwm-tach
> -
> +    oneOf:
> +      # AST2700 with fallback to AST2600

Drop the comments, useless and redundant. We can read the schema.
Inflating code with obvious comments is not making it better.

> +      - items:
> +          - const: aspeed,ast2700-pwm-tach
> +          - const: aspeed,ast2600-pwm-tach
> +      # Only AST2600
> +      - const: aspeed,ast2600-pwm-tach

And why are you removing blank line?

>    reg:

Best regards,
Krzysztof