Re: [PATCH 1/2] dt-bindings: iio: imu: icm42600: add interrupt naming support

From: Conor Dooley
Date: Mon Apr 07 2025 - 11:17:38 EST


On Fri, Apr 04, 2025 at 07:21:13PM +0200, Krzysztof Kozlowski wrote:
> On 04/04/2025 18:53, Conor Dooley wrote:
> > On Fri, Apr 04, 2025 at 05:52:02PM +0200, Jean-Baptiste Maneyrol via B4 Relay wrote:
> >> From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@xxxxxxx>
> >>
> >> Add interrupt-names field for specifying interrupt used.
> >> Only INT1 is supported by the driver currently.
>
>
> Please run scripts/checkpatch.pl and fix reported warnings. After that,
> run also `scripts/checkpatch.pl --strict` and (probably) fix more
> warnings. Some warnings can be ignored, especially from --strict run,
> but the code here looks like it needs a fix. Feel free to get in touch
> if the warning is not clear.
>
> >> ---
> >> .../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 8 ++++++++
> >> 1 file changed, 8 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
> >> index 7e4492bbd0278a336587dc5ac04da7153453da29..f19cdfd7450e04e7c984dc987f3c23f5ad89a248 100644
> >> --- a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
> >> +++ b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
> >> @@ -41,6 +41,12 @@ properties:
> >> interrupts:
> >> maxItems: 1
> >>
> >> + interrupt-names:
> >> + enum:
> >> + - INT1
> >
> > An enum with one entry is just a const.
>
> It's not one entry and that's the problem. Instead it should be items
> with one const.

That was kinda meant to be a comment about the general problem of people
using single-item enums, given the other comment I made about there
being more than one interrupt the result was always going to end up
being an items list with more than one possibility anyway.

Attachment: signature.asc
Description: PGP signature