From 3d21a46093352f7802b9c66c7cce35cd02a50e53 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 15 Apr 2020 19:55:49 -0500 Subject: dt-bindings: Remove cases of 'allOf' containing a '$ref' json-schema versions draft7 and earlier have a weird behavior in that any keywords combined with a '$ref' are ignored (silently). The correct form was to put a '$ref' under an 'allOf'. This behavior is now changed in the 2019-09 json-schema spec and '$ref' can be mixed with other keywords. The json-schema library doesn't yet support this, but the tooling now does a fixup for this and either way works. This has been a constant source of review comments, so let's change this treewide so everyone copies the simpler syntax. Scripted with ruamel.yaml with some manual fixups. Some minor whitespace changes from the script. Signed-off-by: Rob Herring Acked-by: Maxime Ripard Acked-by: Lee Jones Acked-By: Vinod Koul Acked-by: Mark Brown Acked-by: Alexandre Belloni Acked-by: Wolfram Sang # for I2C Reviewed-by: Linus Walleij Acked-by: Jonathan Cameron #for-iio Reviewed-by: Stephen Boyd # clock Signed-off-by: Rob Herring --- Documentation/devicetree/bindings/eeprom/at24.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'Documentation/devicetree/bindings/eeprom') diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml index a15787e504f0..de513fe333a7 100644 --- a/Documentation/devicetree/bindings/eeprom/at24.yaml +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml @@ -118,14 +118,13 @@ properties: maxItems: 1 pagesize: - allOf: - - $ref: /schemas/types.yaml#/definitions/uint32 description: The length of the pagesize for writing. Please consult the manual of your device, that value varies a lot. A wrong value may result in data loss! If not specified, a safety value of '1' is used which will be very slow. - enum: [ 1, 8, 16, 32, 64, 128, 258 ] + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 8, 16, 32, 64, 128, 258] default: 1 read-only: @@ -148,18 +147,16 @@ properties: wp-gpios: true address-width: - allOf: - - $ref: /schemas/types.yaml#/definitions/uint32 description: Number of address bits. + $ref: /schemas/types.yaml#/definitions/uint32 default: 8 enum: [ 8, 16 ] num-addresses: - allOf: - - $ref: /schemas/types.yaml#/definitions/uint32 description: Total number of i2c slave addresses this device takes. + $ref: /schemas/types.yaml#/definitions/uint32 default: 1 minimum: 1 maximum: 8 -- cgit v1.2.3