Devicetree
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: iio: pressure: add invensense,icp10100
@ 2025-07-01 22:05 Rodrigo Gobbi
  2025-07-03  7:38 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Rodrigo Gobbi @ 2025-07-01 22:05 UTC (permalink / raw)
  To: jic23, dlechner, nuno.sa, andy, conor+dt, krzk+dt, robh,
	jean-baptiste.maneyrol
  Cc: ~lkcamp/patches, linux-iio, devicetree, linux-kernel

There is no txt file for it, add yaml for invensense,icp10100
which is already used in the driver.

Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
---
@Krzysztof and @Jonathan,

from v1:
> Filename matching compatible, please.

and:
> No wild cards in file names please.  Just pick a device to name the binding
> after.  Wild cards have an annoying habit of getting messed up by companies
> releasing completely non compatible parts in the middle of what we thought
> was a reserved number range.
...understood the point about wildcards, I`ve changed that in this v2.
I was confused because when I was exploring other files over different trees, noticed
the same wildcard pattern like: [1] and [2] (maybe there are others).

[1] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/power/supply/bq2515x.yaml#L81
[2] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml#L119

I`ve kept the "ICP-101xx" (wildcard) at title and description, if there is a problem with
that, let me know.

@Jean-Baptiste Maneyrol, tks for the answer and ack!
Best regards.

Changelog:
v2: removed wildcard + adding proper maintainer
v1: https://lore.kernel.org/all/20250626212742.7986-1-rodrigo.gobbi.7@gmail.com/
---
 .../iio/pressure/invensense,icp10100.yaml     | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/pressure/invensense,icp10100.yaml

diff --git a/Documentation/devicetree/bindings/iio/pressure/invensense,icp10100.yaml b/Documentation/devicetree/bindings/iio/pressure/invensense,icp10100.yaml
new file mode 100644
index 000000000000..f4f23dc89481
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/pressure/invensense,icp10100.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/pressure/invensense,icp10100.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: InvenSense ICP-101xx Barometric Pressure Sensors
+
+maintainers:
+  - Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
+
+description: |
+  Support for ICP-101xx family: ICP-10100, ICP-10101, ICP-10110, ICP-10111.
+  Those devices uses a simple I2C communication bus, measuring the pressure
+  in a ultra-low noise at the lowest power.
+  Datasheet: https://product.tdk.com/system/files/dam/doc/product/sensor/pressure/capacitive-pressure/data_sheet/ds-000186-icp-101xx.pdf
+
+properties:
+  compatible:
+    const: invensense,icp10100
+
+  reg:
+    maxItems: 1
+
+  vdd-supply: true
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        pressure@63 {
+            compatible = "invensense,icp10100";
+            reg = <0x63>;
+            vdd-supply = <&vdd_1v8>;
+        };
+    };
+...
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] dt-bindings: iio: pressure: add invensense,icp10100
  2025-07-01 22:05 [PATCH v2] dt-bindings: iio: pressure: add invensense,icp10100 Rodrigo Gobbi
@ 2025-07-03  7:38 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-03  7:38 UTC (permalink / raw)
  To: Rodrigo Gobbi
  Cc: jic23, dlechner, nuno.sa, andy, conor+dt, krzk+dt, robh,
	jean-baptiste.maneyrol, ~lkcamp/patches, linux-iio, devicetree,
	linux-kernel

On Tue, Jul 01, 2025 at 07:05:43PM -0300, Rodrigo Gobbi wrote:
> +$id: http://devicetree.org/schemas/iio/pressure/invensense,icp10100.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: InvenSense ICP-101xx Barometric Pressure Sensors
> +
> +maintainers:
> +  - Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
> +
> +description: |
> +  Support for ICP-101xx family: ICP-10100, ICP-10101, ICP-10110, ICP-10111.

The problem with title and description here is that they do not match
compatible. oneOf:

1. Your statement is correct, but then compatibles are incomplete and
will encourage people to use incomplete compatibles for e.g. ICP-10111.
2. Compatible is correct but your statement is not correct, so then fix
the statement - drop other devices.

Assuming 1 is closer to truth, then I suggest to express it with
documenting these compatibles and using invensense,icp10100 as fallback.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-03  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01 22:05 [PATCH v2] dt-bindings: iio: pressure: add invensense,icp10100 Rodrigo Gobbi
2025-07-03  7:38 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox