* [PATCH] dt-bindings: iio: Add dedicated CM32181 schema
@ 2026-09-21 23:27 Rob Herring (Arm)
2026-09-21 23:36 ` sashiko-bot
2026-09-22 15:01 ` Joshua Crofts
0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2026-09-21 23:27 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Krzysztof Kozlowski, Conor Dooley, Kevin Tsai
Cc: linux-iio, devicetree, linux-kernel
Add a dedicated Capella CM32181 ambient light sensor schema. The device
has optional vdd-supply and interrupt properties, so it no longer fits
in trivial-devices. Include both optional properties in the binding
example.
Assisted-by: LLM
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
.../bindings/iio/light/capella,cm32181.yaml | 44 +++++++++++++++++++
.../devicetree/bindings/trivial-devices.yaml | 2 -
2 files changed, 44 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/iio/light/capella,cm32181.yaml
diff --git a/Documentation/devicetree/bindings/iio/light/capella,cm32181.yaml b/Documentation/devicetree/bindings/iio/light/capella,cm32181.yaml
new file mode 100644
index 000000000000..63212e3ec96b
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/capella,cm32181.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/capella,cm32181.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Capella CM32181 ambient light sensor
+
+maintainers:
+ - Kevin Tsai <ktsai@capellamicro.com>
+
+properties:
+ compatible:
+ const: capella,cm32181
+
+ reg:
+ maxItems: 1
+
+ vdd-supply: true
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ light-sensor@10 {
+ compatible = "capella,cm32181";
+ reg = <0x10>;
+ vdd-supply = <&vdd_3v3>;
+ interrupt-parent = <&gpio>;
+ interrupts = <17 IRQ_TYPE_EDGE_RISING>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index b7ddbeb40a27..1778bf9fe17d 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -81,8 +81,6 @@ properties:
- atmel,atsha204a
# BPA-RS600: Power Supply
- blutek,bpa-rs600
- # CM32181: Ambient Light Sensor
- - capella,cm32181
# CM3232: Ambient Light Sensor
- capella,cm3232
# CM3323: Ambient Light Sensor
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: iio: Add dedicated CM32181 schema
2026-09-21 23:27 [PATCH] dt-bindings: iio: Add dedicated CM32181 schema Rob Herring (Arm)
@ 2026-09-21 23:36 ` sashiko-bot
2026-09-22 15:01 ` Joshua Crofts
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-09-21 23:36 UTC (permalink / raw)
To: Rob Herring (Arm); +Cc: robh, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: incorrect use of unevaluatedProperties
--
commit 8c1995822038b741ca98711a9ec628a88e937b63
Author: Rob Herring (Arm) <robh@kernel.org>
dt-bindings: iio: Add dedicated CM32181 schema
This commit adds a dedicated Capella CM32181 ambient light sensor schema.
It moves the device out of trivial-devices to properly document its optional
vdd-supply and interrupt properties.
> diff --git a/Documentation/devicetree/bindings/iio/light/capella,cm32181.yaml b/Documentation/devicetree/bindings/iio/light/capella,cm32181.yaml
> new file mode 100644
> index 0000000000000..63212e3ec96ba
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/capella,cm32181.yaml
[ ... ]
> +required:
> + - compatible
> + - reg
> +
> +unevaluatedProperties: false
[Severity: Low]
Does this schema violate the DT authoring guidelines by using
unevaluatedProperties here?
Since the schema for capella,cm32181 does not reference any external base
schemas (there is no $ref keyword present), should this use
additionalProperties: false instead?
Using unevaluatedProperties without any referenced base schemas is less
efficient and diverges from the standard subsystem conventions for standalone
bindings.
> +
> +examples:
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260921232752.3136129-1-robh@kernel.org?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: iio: Add dedicated CM32181 schema
2026-09-21 23:27 [PATCH] dt-bindings: iio: Add dedicated CM32181 schema Rob Herring (Arm)
2026-09-21 23:36 ` sashiko-bot
@ 2026-09-22 15:01 ` Joshua Crofts
1 sibling, 0 replies; 3+ messages in thread
From: Joshua Crofts @ 2026-09-22 15:01 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Krzysztof Kozlowski, Conor Dooley, Kevin Tsai, linux-iio,
devicetree, linux-kernel
On Mon, 21 Sep 2026 18:27:51 -0500
"Rob Herring (Arm)" <robh@kernel.org> wrote:
> +required:
> + - compatible
> + - reg
> +
> +unevaluatedProperties: false
Why not additionalProperties?
--
Kind regards,
Joshua Crofts
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-22 15:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21 23:27 [PATCH] dt-bindings: iio: Add dedicated CM32181 schema Rob Herring (Arm)
2026-09-21 23:36 ` sashiko-bot
2026-09-22 15:01 ` Joshua Crofts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox