Re: [PATCH v1 1/2] dt-bindings: iio: temperature: Add DT bindings for TMP117
From: Jonathan Cameron <jic23@kernel.org>
Date: 2021-03-20 17:52:33
Also in:
linux-iio, lkml
On Sat, 20 Mar 2021 12:15:08 +0530 Puranjay Mohan [off-list ref] wrote:
Add devicetree binding document for TMP117, a digital temperature sensor.
Contents looks fine, but the ordering is unusual. Vast majority of bindings I've seen have document in an order that makes sense for human readers (not alphabetical!) Use whitespace to help readability as well. Something like:
quoted hunk ↗ jump to hunk
@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/iio/temperature/ti,tmp117.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+title: "TI TMP117 - Digital temperature sensor with integrated NV memory"
+description: | + TI TMP117 - Digital temperature sensor with integrated NV memory that supports
Avoid repeating info in the title.
+ I2C interface. + https://www.ti.com/lit/gpn/tmp1
+maintainers: + - "Puranjay Mohan [off-list ref]"
+properties: + compatible: + enum: + - "ti,tmp117" + reg: + maxItems: 1
+required: + - compatible + - reg
+examples: |
+ tmp117@48 {
+ compatible = "ti,tmp117";
+ reg = <0x48>;
+ };quoted hunk ↗ jump to hunk
Signed-off-by: Puranjay Mohan <redacted> --- .../bindings/iio/temperature/ti,tmp117.yaml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yamldiff --git a/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml new file mode 100644 index 000000000..927660461 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp117.yaml@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/iio/temperature/ti,tmp117.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" +description: | + TI TMP117 - Digital temperature sensor with integrated NV memory that supports + I2C interface. + https://www.ti.com/lit/gpn/tmp1 +examples: | + tmp117@48 { + compatible = "ti,tmp117"; + reg = <0x48>; + }; +maintainers: + - "Puranjay Mohan <puranjay12@gmail.com>" +properties: + compatible: + enum: + - "ti,tmp117" + reg: + maxItems: 1 +required: + - compatible + - reg +title: "TI TMP117 - Digital temperature sensor with integrated NV memory" +