Message ID | 20231118110232.17261-1-579lpy@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v2,1/2] iio: humidity: Add driver for ti HDC302x humidity sensors | expand |
On Sat, Nov 18, 2023 at 07:02:32PM +0800, Li peiyu wrote: > Add device tree bindings for HDC3020/HDC3021/HDC3022 humidity and > temperature sensors. > > changes for v2: Changelog needs to be below the --- line so that it doesn't end up in the commit log. > - change the maintainers to me. > - hdc3020,hdc3021,hdc3022 are compatible,I've changed the dirver. Does that even compile? It was the binding I wanted you to change, not the driver. Take a look at the example-schema for how to do this. Cheers, Conor.
On Sun, Nov 19, 2023 at 21:41, Conor Dooley wrote: ... > > - change the maintainers to me. > > - hdc3020,hdc3021,hdc3022 are compatible,I've changed the dirver. > > Does that even compile? It was the binding I wanted you to change, not > the driver. Take a look at the example-schema for how to do this. In example-schema.yaml, I did not see another way of writing "compatible". So does this mean I need to add an example contains compatible = "ti,hdc3021", "ti,hdc3020"; > Cheers, > Conor. Thanks, Li peiyu.
On Fri, Nov 24, 2023 at 07:38:52PM +0800, peiyu li wrote: > On Sun, Nov 19, 2023 at 21:41, Conor Dooley wrote: > ... > > > - change the maintainers to me. > > > - hdc3020,hdc3021,hdc3022 are compatible,I've changed the dirver. > > > > Does that even compile? It was the binding I wanted you to change, not > > the driver. Take a look at the example-schema for how to do this. > In example-schema.yaml, I did not see another way of writing "compatible". > So does this mean I need to add an example contains > compatible = "ti,hdc3021", "ti,hdc3020"; There is an example in the example schema with two compatibles, take a look.
diff --git a/Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml b/Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml new file mode 100644 index 000000000000..775da99c19ee --- /dev/null +++ b/Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/humidity/ti,hdc3020.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HDC3020/HDC3021/HDC3022 humidity and temperature iio sensors + +maintainers: + - Li peiyu <579lpy@gmail.com> + +description: + https://www.ti.com/lit/ds/symlink/hdc3020.pdf + + The HDC302x is an integrated capacitive based relative humidity (RH) + and temperature sensor. + +properties: + compatible: + enum: + - ti,hdc3020 + - ti,hdc3021 + - ti,hdc3022 + + interrupts: + maxItems: 1 + + vdd-supply: true + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + humidity-sensor@47 { + compatible = "ti,hdc3020"; + reg = <0x47>; + }; + };
Add device tree bindings for HDC3020/HDC3021/HDC3022 humidity and temperature sensors. changes for v2: - change the maintainers to me. - hdc3020,hdc3021,hdc3022 are compatible,I've changed the dirver. - change the node name to humidity-sensor. Signed-off-by: Li peiyu <579lpy@gmail.com> --- .../bindings/iio/humidity/ti,hdc3020.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml