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

docs: dt: Fix a few grammar nits in the binding/schema docs

Add missing hyphens and reword one sentence for clarity.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20211003124936.1.Idc7beddc77250bca0cfb5912b56be719d9073bc4@changeid
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Simon Glass and committed by
Rob Herring
37ef2c34 91cb8860

+23 -22
+7 -7
Documentation/devicetree/bindings/example-schema.yaml
··· 119 119 # valid for this binding. 120 120 121 121 clock-frequency: 122 - # The type is set in the core schema. Per device schema only need to set 122 + # The type is set in the core schema. Per-device schema only need to set 123 123 # constraints on the possible values. 124 124 minimum: 100 125 125 maximum: 400000 ··· 133 133 # *-supply is always a single phandle, so nothing more to define. 134 134 foo-supply: true 135 135 136 - # Vendor specific properties 136 + # Vendor-specific properties 137 137 # 138 - # Vendor specific properties have slightly different schema requirements than 138 + # Vendor-specific properties have slightly different schema requirements than 139 139 # common properties. They must have at least a type definition and 140 140 # 'description'. 141 141 vendor,int-property: 142 - description: Vendor specific properties must have a description 142 + description: Vendor-specific properties must have a description 143 143 $ref: /schemas/types.yaml#/definitions/uint32 144 144 enum: [2, 4, 6, 8, 10] 145 145 146 146 vendor,bool-property: 147 - description: Vendor specific properties must have a description. Boolean 147 + description: Vendor-specific properties must have a description. Boolean 148 148 properties are one case where the json-schema 'type' keyword can be used 149 149 directly. 150 150 type: boolean 151 151 152 152 vendor,string-array-property: 153 - description: Vendor specific properties should reference a type in the 153 + description: Vendor-specific properties should reference a type in the 154 154 core schema. 155 155 $ref: /schemas/types.yaml#/definitions/string-array 156 156 items: ··· 158 158 - enum: [baz, boo] 159 159 160 160 vendor,property-in-standard-units-microvolt: 161 - description: Vendor specific properties having a standard unit suffix 161 + description: Vendor-specific properties having a standard unit suffix 162 162 don't need a type. 163 163 enum: [ 100, 200, 300 ] 164 164
+1 -1
Documentation/devicetree/bindings/writing-bindings.rst
··· 44 44 of prior implementations. DO add new compatibles in case there are new 45 45 features or bugs. 46 46 47 - - DO use a vendor prefix on device specific property names. Consider if 47 + - DO use a vendor prefix on device-specific property names. Consider if 48 48 properties could be common among devices of the same class. Check other 49 49 existing bindings for similar devices. 50 50
+15 -14
Documentation/devicetree/bindings/writing-schema.rst
··· 4 4 ========================================== 5 5 6 6 Devicetree bindings are written using json-schema vocabulary. Schema files are 7 - written in a JSON compatible subset of YAML. YAML is used instead of JSON as it 7 + written in a JSON-compatible subset of YAML. YAML is used instead of JSON as it 8 8 is considered more human readable and has some advantages such as allowing 9 9 comments (Prefixed with '#'). 10 10 ··· 22 22 URI typically containing the binding's filename and path. For DT schema, it must 23 23 begin with "http://devicetree.org/schemas/". The URL is used in constructing 24 24 references to other files specified in schema "$ref" properties. A $ref value 25 - with a leading '/' will have the hostname prepended. A $ref value a relative 26 - path or filename only will be prepended with the hostname and path components 27 - of the current schema file's '$id' value. A URL is used even for local files, 28 - but there may not actually be files present at those locations. 25 + with a leading '/' will have the hostname prepended. A $ref value with only a 26 + relative path or filename will be prepended with the hostname and path 27 + components of the current schema file's '$id' value. A URL is used even for 28 + local files, but there may not actually be files present at those locations. 29 29 30 30 $schema 31 31 Indicates the meta-schema the schema file adheres to. 32 32 33 33 title 34 - A one line description on the contents of the binding schema. 34 + A one-line description on the contents of the binding schema. 35 35 36 36 maintainers 37 37 A DT specific property. Contains a list of email address(es) ··· 45 45 46 46 select 47 47 Optional. A json-schema used to match nodes for applying the 48 - schema. By default without 'select', nodes are matched against their possible 49 - compatible string values or node name. Most bindings should not need select. 48 + schema. By default, without 'select', nodes are matched against their possible 49 + compatible-string values or node name. Most bindings should not need select. 50 50 51 51 allOf 52 52 Optional. A list of other schemas to include. This is used to ··· 56 56 properties 57 57 A set of sub-schema defining all the DT properties for the 58 58 binding. The exact schema syntax depends on whether properties are known, 59 - common properties (e.g. 'interrupts') or are binding/vendor specific properties. 59 + common properties (e.g. 'interrupts') or are binding/vendor-specific 60 + properties. 60 61 61 62 A property can also define a child DT node with child properties defined 62 63 under it. ··· 82 81 83 82 The 'properties' section of the schema contains all the DT properties for a 84 83 binding. Each property contains a set of constraints using json-schema 85 - vocabulary for that property. The properties schemas are what is used for 84 + vocabulary for that property. The properties schemas are what are used for 86 85 validation of DT files. 87 86 88 - For common properties, only additional constraints not covered by the common 87 + For common properties, only additional constraints not covered by the common, 89 88 binding schema need to be defined such as how many values are valid or what 90 89 possible values are valid. 91 90 92 - Vendor specific properties will typically need more detailed schema. With the 91 + Vendor-specific properties will typically need more detailed schema. With the 93 92 exception of boolean properties, they should have a reference to a type in 94 93 schemas/types.yaml. A "description" property is always required. 95 94 96 - The Devicetree schemas don't exactly match the YAML encoded DT data produced by 95 + The Devicetree schemas don't exactly match the YAML-encoded DT data produced by 97 96 dtc. They are simplified to make them more compact and avoid a bunch of 98 97 boilerplate. The tools process the schema files to produce the final schema for 99 98 validation. There are currently 2 transformations the tools perform. 100 99 101 - The default for arrays in json-schema is they are variable sized and allow more 100 + The default for arrays in json-schema is they are variable-sized and allow more 102 101 entries than explicitly defined. This can be restricted by defining 'minItems', 103 102 'maxItems', and 'additionalItems'. However, for DeviceTree Schemas, a fixed 104 103 size is desired in most cases, so these properties are added based on the