diff mbox series

dt-bindings: at24: Rework special case compatible handling

Message ID 9ca85ea0eda03d581ccb435052cf37ba19000c3b.1638959309.git.geert+renesas@glider.be
State Accepted
Commit 6f89f413340f548179eb33ce3b0758ceee01371f
Headers show
Series dt-bindings: at24: Rework special case compatible handling | expand

Commit Message

Geert Uytterhoeven Dec. 8, 2021, 10:30 a.m. UTC
Sort the compatible values for the special cases by EEPROM size, like is
done for the normal cases.
Combine entries with a common fallback using enums, to compact the
table.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 .../devicetree/bindings/eeprom/at24.yaml      | 25 ++++++++-----------
 1 file changed, 11 insertions(+), 14 deletions(-)

Comments

Bartosz Golaszewski Dec. 10, 2021, 3:19 p.m. UTC | #1
On Wed, Dec 8, 2021 at 11:45 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> Sort the compatible values for the special cases by EEPROM size, like is
> done for the normal cases.
> Combine entries with a common fallback using enums, to compact the
> table.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Looks good, applied!

Thanks!
Bart
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml
index 4c5396a9744f68f5..8b9f230e84156b5b 100644
--- a/Documentation/devicetree/bindings/eeprom/at24.yaml
+++ b/Documentation/devicetree/bindings/eeprom/at24.yaml
@@ -95,17 +95,20 @@  properties:
       # These are special cases that don't conform to the above pattern.
       # Each requires a standard at24 model as fallback.
       - items:
-          - const: nxp,se97b
-          - const: atmel,24c02
+          - enum:
+              - rohm,br24g01
+              - rohm,br24t01
+          - const: atmel,24c01
       - items:
-          - const: onnn,cat24c04
-          - const: atmel,24c04
+          - enum:
+              - nxp,se97b
+              - renesas,r1ex24002
+          - const: atmel,24c02
       - items:
-          - const: onnn,cat24c05
+          - enum:
+              - onnn,cat24c04
+              - onnn,cat24c05
           - const: atmel,24c04
-      - items:
-          - const: renesas,r1ex24002
-          - const: atmel,24c02
       - items:
           - const: renesas,r1ex24016
           - const: atmel,24c16
@@ -115,12 +118,6 @@  properties:
       - items:
           - const: renesas,r1ex24128
           - const: atmel,24c128
-      - items:
-          - const: rohm,br24g01
-          - const: atmel,24c01
-      - items:
-          - const: rohm,br24t01
-          - const: atmel,24c01
 
   label:
     description: Descriptive name of the EEPROM.