diff mbox series

[1/3] dt-bindings: input: sun4i-lradc-keys: Add R329 and D1 compatibles

Message ID 20210908034016.24119-2-samuel@sholland.org (mailing list archive)
State Mainlined
Commit a85a8ca9d2fb153944aea1d1b664e64d4ed0b88f
Headers show
Series Input: sun4i-lradc-keys: R329 and D1 support | expand

Commit Message

Samuel Holland Sept. 8, 2021, 3:40 a.m. UTC
The R329 and D1 SoCs each contain an LRADC with a programming interface
compatible to earlier LRADCs. However, the LRADC now has its own clock
gate and reset line, instead of being always active.

To support this, add clock/reset properties to the binding, and require
them for the variant in the new SoCs.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 .../input/allwinner,sun4i-a10-lradc-keys.yaml | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Maxime Ripard Sept. 8, 2021, 5:51 a.m. UTC | #1
On Tue, Sep 07, 2021 at 10:40:14PM -0500, Samuel Holland wrote:
> The R329 and D1 SoCs each contain an LRADC with a programming interface
> compatible to earlier LRADCs. However, the LRADC now has its own clock
> gate and reset line, instead of being always active.
> 
> To support this, add clock/reset properties to the binding, and require
> them for the variant in the new SoCs.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Acked-by: Maxime Ripard <maxime@cerno.tech>

Maxime
Rob Herring (Arm) Sept. 20, 2021, 10:31 p.m. UTC | #2
On Tue, 07 Sep 2021 22:40:14 -0500, Samuel Holland wrote:
> The R329 and D1 SoCs each contain an LRADC with a programming interface
> compatible to earlier LRADCs. However, the LRADC now has its own clock
> gate and reset line, instead of being always active.
> 
> To support this, add clock/reset properties to the binding, and require
> them for the variant in the new SoCs.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
>  .../input/allwinner,sun4i-a10-lradc-keys.yaml | 22 +++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 

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

Patch

diff --git a/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml b/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
index cffd02028d02..cfb84b8a1b90 100644
--- a/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
+++ b/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
@@ -18,10 +18,20 @@  properties:
       - items:
           - const: allwinner,sun50i-a64-lradc
           - const: allwinner,sun8i-a83t-r-lradc
+      - const: allwinner,sun50i-r329-lradc
+      - items:
+          - const: allwinner,sun20i-d1-lradc
+          - const: allwinner,sun50i-r329-lradc
 
   reg:
     maxItems: 1
 
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
   interrupts:
     maxItems: 1
 
@@ -66,6 +76,18 @@  required:
   - interrupts
   - vref-supply
 
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - allwinner,sun50i-r329-lradc
+
+then:
+  required:
+    - clocks
+    - resets
+
 additionalProperties: false
 
 examples: