From: Tóth János <gomba007@gmail.com>
Add documentation for the DFRobot SEN0322 oxygen sensor.
Signed-off-by: Tóth János <gomba007@gmail.com>
---
.../bindings/iio/chemical/dfrobot,sen0322.yaml | 41 ++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/chemical/dfrobot,sen0322.yaml b/Documentation/devicetree/bindings/iio/chemical/dfrobot,sen0322.yaml
new file mode 100644
index 000000000000..9410d04fb91d
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/chemical/dfrobot,sen0322.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/chemical/dfrobot,sen0322.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: DFRobot SEN0322 oxygen sensor
+
+maintainers:
+ - Tóth János <gomba007@gmail.com>
+
+description: >
+ DFRobot SEN0322 is an oxygen sensor. It supports I2C for communication.
+
+ Datasheet:
+ https://wiki.dfrobot.com/Gravity_I2C_Oxygen_Sensor_SKU_SEN0322
+
+properties:
+ compatible:
+ const: dfrobot,sen0322
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sen0322@73 {
+ compatible = "dfrobot,sen0322";
+ reg = <0x73>;
+ };
+ };
--
2.34.1
On 28/04/2025 12:50, Tóth János via B4 Relay wrote:
> +
> +description: >
> + DFRobot SEN0322 is an oxygen sensor. It supports I2C for communication.
> +
> + Datasheet:
> + https://wiki.dfrobot.com/Gravity_I2C_Oxygen_Sensor_SKU_SEN0322
> +
> +properties:
> + compatible:
> + const: dfrobot,sen0322
> +
> + reg:
> + maxItems: 1
No other properties like supplies or configuration? If so, this could go
to trivial-devices.
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + sen0322@73 {
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
Choose something from above or similar devices.
Best regards,
Krzysztof
Hi!
> No other properties like supplies or configuration? If so, this could go
> to trivial-devices.
I don't think so, I'll add it as a trivial-device then.
> > + sen0322@73 {
>
> Node names should be generic. See also an explanation and list of
> examples (not exhaustive) in DT specification:
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
>
> Choose something from above or similar devices.
Noted, thanks!
Best regards,
János
On Mon, 28 Apr 2025 16:45:32 +0200
Tóth János <gomba007@gmail.com> wrote:
> Hi!
>
> > No other properties like supplies or configuration? If so, this could go
> > to trivial-devices.
>
> I don't think so, I'll add it as a trivial-device then.
vcc-supply?
It is very common to see later boards have controllable supplies
(or someone to enable that on an existing board for power saving) so
good and trivial to support just turning the supply on when we probe
the driver and off when we remove it.
>
> > > + sen0322@73 {
> >
> > Node names should be generic. See also an explanation and list of
> > examples (not exhaustive) in DT specification:
> > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> >
> > Choose something from above or similar devices.
>
> Noted, thanks!
>
> Best regards,
> János
>
>
Hi! > > > No other properties like supplies or configuration? If so, this could go > > > to trivial-devices. > > > > I don't think so, I'll add it as a trivial-device then. > > vcc-supply? It has no switchable VCC supply. Regards, János
On Mon, 5 May 2025 08:32:02 +0200 Tóth János <gomba007@gmail.com> wrote: > Hi! > > > > > No other properties like supplies or configuration? If so, this could go > > > > to trivial-devices. > > > > > > I don't think so, I'll add it as a trivial-device then. > > > > vcc-supply? > > It has no switchable VCC supply. Your board may have no switchable vcc-supply. In general someone else's board with this part in use may well have a switchable vcc-supply. Ideally the DT binding should support that and the driver should just turn it on at probe. A stub / fake regulator will be provided by the regulator core so there is no need for special handling of boards that don't have switchable vcc-supply - they will just work. Jonathan > > Regards, > János >
© 2016 - 2026 Red Hat, Inc.