Message ID | 20231020-topic-chipcap2-v4-4-7940cfa7613a@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | hwmon: Add support for Amphenol ChipCap 2 | expand |
On Mon, 18 Dec 2023 20:10:32 +0100, Javier Carrasco wrote: > Add device tree bindings and an example for the ChipCap 2 humidity > and temperature sensor. > > Reviewed-by: Conor Dooley <conor.dooley@microchip.com> > Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> > --- > .../bindings/hwmon/amphenol,chipcap2.yaml | 77 ++++++++++++++++++++++ > 1 file changed, 77 insertions(+) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.example.dtb: humidity@28: compatible: 'oneOf' conditional failed, one must be fixed: ['amphenol,cc2d23s'] is too short 'amphenol,cc2d23' was expected from schema $id: http://devicetree.org/schemas/hwmon/amphenol,chipcap2.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231020-topic-chipcap2-v4-4-7940cfa7613a@gmail.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 18/12/2023 20:10, Javier Carrasco wrote: > Add device tree bindings and an example for the ChipCap 2 humidity > and temperature sensor. > > Reviewed-by: Conor Dooley <conor.dooley@microchip.com> > Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> > --- > .../bindings/hwmon/amphenol,chipcap2.yaml | 77 ++++++++++++++++++++++ > 1 file changed, 77 insertions(+) > > + > +description: | > + Relative humidity and temperature sensor on I2C bus. > + > + Datasheets: > + https://www.amphenol-sensors.com/en/telaire/humidity/527-humidity-sensors/3095-chipcap-2 > + > +properties: > + compatible: > + oneOf: > + - const: amphenol,cc2d23 Please test your patches before sending. Best regards, Krzysztof
On 19.12.23 08:42, Krzysztof Kozlowski wrote: > > Please test your patches before sending. > > Best regards, > Krzysztof > Sorry for that, I did a last-minute modification to comply with the changes in the driver and I forgot to check the bindings again. Definitely something to avoid in the the future. Adding the const "amphenol,cc2d23" to the compatible property fixes the issue and passes the tests, so I will include it in the next version. Best regards, Javier Carrasco
diff --git a/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml new file mode 100644 index 000000000000..738c278d6403 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/amphenol,chipcap2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ChipCap 2 humidity and temperature iio sensor + +maintainers: + - Javier Carrasco <javier.carrasco.cruz@gmail.com> + +description: | + Relative humidity and temperature sensor on I2C bus. + + Datasheets: + https://www.amphenol-sensors.com/en/telaire/humidity/527-humidity-sensors/3095-chipcap-2 + +properties: + compatible: + oneOf: + - const: amphenol,cc2d23 + - items: + - enum: + - amphenol,cc2d23s + - amphenol,cc2d25 + - amphenol,cc2d25s + - amphenol,cc2d33 + - amphenol,cc2d33s + - amphenol,cc2d35 + - amphenol,cc2d35s + - const: amphenol,cc2d23 + + reg: + maxItems: 1 + + interrupts: + items: + - description: measurement ready indicator + - description: low humidity alarm + - description: high humidity alarm + + interrupt-names: + items: + - const: ready + - const: low + - const: high + + vdd-supply: + description: + Dedicated, controllable supply-regulator to reset the device and + enter in command mode. + +required: + - compatible + - reg + - vdd-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + humidity@28 { + compatible = "amphenol,cc2d23s"; + reg = <0x28>; + interrupt-parent = <&gpio>; + interrupts = <4 IRQ_TYPE_EDGE_RISING>, + <5 IRQ_TYPE_EDGE_RISING>, + <6 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "ready", "low", "high"; + vdd-supply = <®_vdd>; + }; + };