diff mbox series

[6/6] dt-bindings: watchdog: realtek,otto-wdt: simplify requiring interrupt-names

Message ID 20230415095112.51257-6-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted
Headers show
Series [1/6] dt-bindings: watchdog: drop duplicated GPIO watchdog bindings | expand

Commit Message

Krzysztof Kozlowski April 15, 2023, 9:51 a.m. UTC
Required properties should be listed in "required:" block.  Since
interrupts are already there, the dependency of interrupt-names on the
interrupts can be simplified.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/watchdog/realtek,otto-wdt.yaml        | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Sander Vanheule April 16, 2023, 7 p.m. UTC | #1
Hi Krzysztof,

On Sat, 2023-04-15 at 11:51 +0200, Krzysztof Kozlowski wrote:
> Required properties should be listed in "required:" block.  Since
> interrupts are already there, the dependency of interrupt-names on the
> interrupts can be simplified.

Maybe I'm not reading this right, but isn't the dependency stated in the binding
"interrupts requires interrupt-names to be present"? resource-names.txt
describes the reverse dependency ("interrupt-names is only meaningful with an
associated interrupts").

> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---

In any case, I'm OK with a flattened requirements list:

Acked-by: Sander Vanheule <sander@svanheule.net>


Best,
Sander
Krzysztof Kozlowski April 17, 2023, 6:20 a.m. UTC | #2
On 16/04/2023 21:00, Sander Vanheule wrote:
> Hi Krzysztof,
> 
> On Sat, 2023-04-15 at 11:51 +0200, Krzysztof Kozlowski wrote:
>> Required properties should be listed in "required:" block.  Since
>> interrupts are already there, the dependency of interrupt-names on the
>> interrupts can be simplified.
> 
> Maybe I'm not reading this right, but isn't the dependency stated in the binding
> "interrupts requires interrupt-names to be present"? resource-names.txt
> describes the reverse dependency ("interrupt-names is only meaningful with an
> associated interrupts").

The interrupts are already required by the binding, so the dependency,
which makes interrupts depending on presence of interrupt-names,
effectively was making the names required.

Best regards,
Krzysztof
Rob Herring (Arm) April 18, 2023, 9:39 p.m. UTC | #3
On Sat, 15 Apr 2023 11:51:12 +0200, Krzysztof Kozlowski wrote:
> Required properties should be listed in "required:" block.  Since
> interrupts are already there, the dependency of interrupt-names on the
> interrupts can be simplified.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/watchdog/realtek,otto-wdt.yaml        | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml b/Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml
index 099245fe7b10..1f5390a67cdb 100644
--- a/Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml
@@ -67,12 +67,10 @@  required:
   - reg
   - clocks
   - interrupts
+  - interrupt-names
 
 unevaluatedProperties: false
 
-dependencies:
-  interrupts: [ interrupt-names ]
-
 examples:
   - |
     watchdog: watchdog@3150 {