Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: rtc: abx80x: Improve checks on trickle charger constraints

The abracon,tc-diode and abracon,tc-resistor DT properties are only
valid for the ABx0804 and ABx0805. Furthermore, they must both be
present, or neither of them must be specified. Add rules to check this.

The generic abracon,abx08x compatible string doesn't indicate which chip
variant is used, but performs auto-detection at runtime. It must this
also allow the two above properties.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240305080944.17991-1-laurent.pinchart@ideasonboard.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Laurent Pinchart and committed by
Alexandre Belloni
32a6be08 1e60ac6b

+22 -3
+22 -3
Documentation/devicetree/bindings/rtc/abracon,abx80x.yaml
··· 9 9 maintainers: 10 10 - linux-rtc@vger.kernel.org 11 11 12 - allOf: 13 - - $ref: rtc.yaml# 14 - 15 12 properties: 16 13 compatible: 17 14 description: ··· 52 55 $ref: /schemas/types.yaml#/definitions/uint32 53 56 enum: [0, 3, 6, 11] 54 57 58 + dependentRequired: 59 + abracon,tc-diode: ["abracon,tc-resistor"] 60 + abracon,tc-resistor: ["abracon,tc-diode"] 61 + 55 62 required: 56 63 - compatible 57 64 - reg 65 + 66 + allOf: 67 + - $ref: rtc.yaml# 68 + - if: 69 + properties: 70 + compatible: 71 + not: 72 + contains: 73 + enum: 74 + - abracon,abx80x 75 + - abracon,ab0804 76 + - abracon,ab1804 77 + - abracon,ab0805 78 + - abracon,ab1805 79 + then: 80 + properties: 81 + abracon,tc-diode: false 82 + abracon,tc-resistor: false 58 83 59 84 unevaluatedProperties: false 60 85