[PATCH v6 4/7] dt-bindings: iio: accel: adxl345: make interrupts not a required property

Lothar Rubusch posted 7 patches 1 year ago
There is a newer version of this series
[PATCH v6 4/7] dt-bindings: iio: accel: adxl345: make interrupts not a required property
Posted by Lothar Rubusch 1 year ago
Remove interrupts from the list of required properties. The ADXL345
provides two interrupt lines. Anyway, the interrupts are an option, to
be used for additional event features. The driver can measure without
interrupts. Hence, interrupts should never have been required for the
ADXL345. Thus having interrupts required can be considered to be a
mistake.

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
---
 Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
index 0fe878473..30ba4d3fb 100644
--- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
@@ -44,7 +44,6 @@ properties:
 required:
   - compatible
   - reg
-  - interrupts
 
 allOf:
   - $ref: /schemas/spi/spi-peripheral-props.yaml#
-- 
2.39.5
Re: [PATCH v6 4/7] dt-bindings: iio: accel: adxl345: make interrupts not a required property
Posted by Krzysztof Kozlowski 1 year ago
On Wed, Dec 11, 2024 at 11:06:45PM +0000, Lothar Rubusch wrote:
> Remove interrupts from the list of required properties. The ADXL345
> provides two interrupt lines. Anyway, the interrupts are an option, to
> be used for additional event features. The driver can measure without
> interrupts. Hence, interrupts should never have been required for the
> ADXL345. Thus having interrupts required can be considered to be a
> mistake.

Partially this explains my question on previous patch, so consider
reordering them.

And with combined knowledge, your driver now depends on interrupt names
to setup interrupts. "interrupts" property alone is not sufficient, so
you should encode it in the binding and explain in rationale why this is
required (it is a change in ABI).

https://elixir.bootlin.com/linux/v6.8-rc3/source/Documentation/devicetree/bindings/example-schema.yaml#L193

Best regards,
Krzysztof