diff mbox series

[dt-schema,v2] schemas: property-units: Sanitize unit naming

Message ID 20210901151045.2483811-1-geert+renesas@glider.be
State New
Headers show
Series [dt-schema,v2] schemas: property-units: Sanitize unit naming | expand

Commit Message

Geert Uytterhoeven Sept. 1, 2021, 3:10 p.m. UTC
Make the naming of units consistent with common practices:
  - Do not capitalize the first character of units ("Celsius" is
    special, as it is not the unit name, but a reference to its
    proposer),
  - Do not use plural for units,
  - Do not abbreviate "ampere",
  - Concatenate prefixes and units (no spaces or hyphens),
  - Separate units by spaces not hyphens,
  - "milli" applies to "degree", not to "Celsius".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Cfr. Linux commit 573748081a66b2ba ("dt-bindings: property-units:
Sanitize unit naming").

v2:
  - Rebased on top of commit f5a200cb84c70565 ("schemas: Allow a matrix
    for -microvolt suffix").
---
 schemas/property-units.yaml | 40 ++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

Comments

Rob Herring Sept. 3, 2021, 9:13 p.m. UTC | #1
On Wed, 01 Sep 2021 17:10:45 +0200, Geert Uytterhoeven wrote:
> Make the naming of units consistent with common practices:

>   - Do not capitalize the first character of units ("Celsius" is

>     special, as it is not the unit name, but a reference to its

>     proposer),

>   - Do not use plural for units,

>   - Do not abbreviate "ampere",

>   - Concatenate prefixes and units (no spaces or hyphens),

>   - Separate units by spaces not hyphens,

>   - "milli" applies to "degree", not to "Celsius".

> 

> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

> ---

> Cfr. Linux commit 573748081a66b2ba ("dt-bindings: property-units:

> Sanitize unit naming").

> 

> v2:

>   - Rebased on top of commit f5a200cb84c70565 ("schemas: Allow a matrix

>     for -microvolt suffix").

> ---

>  schemas/property-units.yaml | 40 ++++++++++++++++++-------------------

>  1 file changed, 20 insertions(+), 20 deletions(-)

> 


Applied, thanks!
diff mbox series

Patch

diff --git a/schemas/property-units.yaml b/schemas/property-units.yaml
index 1e710bc02ae92e3d..c1d531824b3acc2d 100644
--- a/schemas/property-units.yaml
+++ b/schemas/property-units.yaml
@@ -25,11 +25,11 @@  select: true
 patternProperties:
   "-bits$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: Number of bits
+    description: number of bits
 
   "-kBps$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: Kilobytes per second
+    description: kilobytes per second
 
   "-percent$":
     $ref: "types.yaml#/definitions/uint32-array"
@@ -41,65 +41,65 @@  patternProperties:
     description: megahertz
   "-hz$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: Hertz (preferred)
+    description: hertz (preferred)
   "-sec$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: seconds
+    description: second
   "-ms$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: milliseconds
+    description: millisecond
   "-us$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: microseconds
+    description: microsecond
   "-ns$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: nanoseconds
+    description: nanosecond
   "-ps$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: picoseconds
+    description: picosecond
 
   # Distance
   "-mm$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: millimeters
+    description: millimeter
 
   # Electricity
   "-microamp$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: micro amps
+    description: microampere
   "-microamp-hours$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: micro amp-hours
+    description: microampere hour
   "-ohms$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: Ohms
+    description: ohm
   "-micro-ohms$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: micro Ohms
+    description: microohm
   "-microwatt-hours$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: micro Watt-hours
+    description: microwatt hour
   "-microvolt$":
     $ref: "types.yaml#/definitions/uint32-matrix"
-    description: micro volts
+    description: microvolt
   "-picofarads$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: picofarads
+    description: picofarad
   "-femtofarads$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: femtofarads
+    description: femtofarad
 
   # Temperature
   "-celsius$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: Degrees Celsius
+    description: degree Celsius
   "-millicelsius$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: Degreee milli-Celsius
+    description: millidegree Celsius
 
   # Pressure
   "-kpascal$":
     $ref: "types.yaml#/definitions/uint32-array"
-    description: kiloPascal
+    description: kilopascal
 
 additionalProperties: true