Linux Input/HID development
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: Svyatoslav Ryhel <clamor95@gmail.com>,
	linux-input@vger.kernel.org, conor+dt@kernel.org,
	dmitry.torokhov@gmail.com, krzk+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v5 1/2] dt-bindings: input: Document Imagis ISA1200 haptic motor driver
Date: Thu, 14 May 2026 09:42:14 -0500	[thread overview]
Message-ID: <20260514144214.GA472306-robh@kernel.org> (raw)
In-Reply-To: <20260513201558.808C4C19425@smtp.kernel.org>

On Wed, May 13, 2026 at 08:15:57PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Missing scalar type definitions for `imagis,period-ns` and `imagis,duty-cycle-ns` cause schema bounds validation to be silently bypassed.
> --
> 
> commit c2a7ef2ca3d62317c69bc5b6a450107172eeeac7
> Author: Svyatoslav Ryhel <clamor95@gmail.com>
> 
> dt-bindings: input: Document Imagis ISA1200 haptic motor driver
> 
> This commit documents the Imagis ISA1200 haptic motor driver. It introduces
> a new YAML binding schema for the driver, specifying properties like
> control-gpios, clocks, and internal PWM configurations.
> 
> > diff --git a/Documentation/devicetree/bindings/input/imagis,isa1200.yaml b/Documentation/devicetree/bindings/input/imagis,isa1200.yaml
> > new file mode 100644
> > index 0000000000000..bbe6f99d39c19
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/input/imagis,isa1200.yaml
> [ ... ]
> > @@ -0,0 +1,140 @@
> [ ... ]
> > +  imagis,mode:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: |
> > +      Defines the motor type isa1200 drives
> > +      0 - LRA (Linear Resonant Actuator)
> > +      1 - ERM (Eccentric Rotating Mass)
> > +    enum: [0, 1]
> > +    default: 0
> > +
> > +  imagis,period-ns:
> > +    description:
> > +      Period of the internal PWM channel in nanoseconds.
> > +    minimum: 10000
> > +    maximum: 30000
> > +
> > +  imagis,duty-cycle-ns:
> > +    description:
> > +      Duty cycle of the external/internal PWM channel in nanoseconds,
> > +      defaults to 50% of the channel's period
> 
> Will the minimum and maximum bounds on imagis,period-ns be silently ignored
> during validation?
> 
> The core property-units.yaml schema automatically assigns an array type to
> properties ending in -ns. Without an explicit reference to
> /schemas/types.yaml#/definitions/uint32, these properties are evaluated as
> arrays rather than scalar integers. 
> 
> In standard JSON Schema, numeric constraints like minimum and maximum are
> ignored when applied to an array instance. Adding the uint32 type reference
> for both imagis,period-ns and imagis,duty-cycle-ns would ensure the
> constraints are properly enforced on a single scalar value.

Wrong.

While that's true for json-schema, the standard unit properties 
schemas will be fixed up to the right type.

Rob

  reply	other threads:[~2026-05-14 14:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 10:24 [PATCH v5 0/2] input: misc: add support for Imagis ISA1200 haptic motor driver Svyatoslav Ryhel
2026-05-12 10:24 ` [PATCH v5 1/2] dt-bindings: input: Document " Svyatoslav Ryhel
2026-05-13 20:15   ` sashiko-bot
2026-05-14 14:42     ` Rob Herring [this message]
2026-05-14 14:55   ` Rob Herring
2026-05-14 15:00     ` Svyatoslav Ryhel
2026-05-12 10:24 ` [PATCH v5 2/2] Input: isa1200 - new driver for Imagis ISA1200 Svyatoslav Ryhel
2026-05-13 20:44   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260514144214.GA472306-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox