Linux Input/HID development
 help / color / mirror / Atom feed
From: Jun Yan <jerrysteve1101@gmail.com>
To: conor@kernel.org
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
	dmitry.torokhov@gmail.com, jerrysteve1101@gmail.com,
	krzk+dt@kernel.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH 3/8] dt-bindings: input: microchip,cap11xx: Cleanup and refine LED constraints
Date: Tue,  9 Jun 2026 21:56:03 +0800	[thread overview]
Message-ID: <20260609135603.848573-1-jerrysteve1101@gmail.com> (raw)
In-Reply-To: <20260608-mooned-ambiguous-02493b8d383e@spud>

> On Sat, Jun 06, 2026 at 11:03:56PM +0800, Jun Yan wrote:
> > Add detailed datasheet links for all supported CAP11xx devices.
> >=20
> > Unify LED node pattern to support all chip variants in preparation
> > for CAP1114 support.
> >=20
> > Remove redundant LED properties inherited from common.yaml
> >=20
> > Apply per-chip LED channel limits:
> > - CAP1126: max 2 channels (0-1)
> > - CAP1188: max 8 channels (0-7)
> > - CAP1106, CAP12xx: no LED support
> >=20
> > Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
> > ---
> >  .../bindings/input/microchip,cap11xx.yaml     | 51 ++++++++++++++-----
> >  1 file changed, 37 insertions(+), 14 deletions(-)
> >=20
> > diff --git a/Documentation/devicetree/bindings/input/microchip,cap11xx.ya=
> ml b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
> > index 7ade03f1b32b..99d00f572a2d 100644
> > --- a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
> > +++ b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
> > @@ -10,6 +10,15 @@ description: |
> >    The Microchip CAP1xxx Family of RightTouchTM multiple-channel capaciti=
> ve
> >    touch controllers and LED drivers. The device communication via I2C on=
> ly.
> > =20
> > +  For more product information please see the links below:
> > +    CAP1106: https://ww1.microchip.com/downloads/en/DeviceDoc/00001624B.=
> pdf
> > +    CAP1126: https://ww1.microchip.com/downloads/en/DeviceDoc/00001623B.=
> pdf
> > +    CAP1188: https://ww1.microchip.com/downloads/en/DeviceDoc/00001620C.=
> pdf
> > +    CAP1203: https://ww1.microchip.com/downloads/en/DeviceDoc/00001572B.=
> pdf
> > +    CAP1206: https://ww1.microchip.com/downloads/en/DeviceDoc/00001567B.=
> pdf
> > +    CAP1293: https://ww1.microchip.com/downloads/en/DeviceDoc/00001566B.=
> pdf
> > +    CAP1298: https://ww1.microchip.com/downloads/en/DeviceDoc/00001571B.=
> pdf
> > +
> >  maintainers:
> >    - Rob Herring <robh@kernel.org>
> > =20
> > @@ -124,25 +133,21 @@ properties:
> >        The number of entries must correspond to the number of channels.
> > =20
> >  patternProperties:
> > -  "^led@[0-7]$":
> > +  "^led@[0-9a-f]$":
> >      type: object
> >      description: CAP11xx LEDs
> >      $ref: /schemas/leds/common.yaml#
> > =20
> >      properties:
> >        reg:
> > -        enum: [0, 1, 2, 3, 4, 5, 6, 7]
> > -
> > -      label: true
> > -
> > -      linux,default-trigger: true
> > -
> > -      default-state: true
> > +        description: LED channel number
> > +        minimum: 0
> > +        maximum: 7
> > =20
> >      required:
> >        - reg
> > =20
> > -    additionalProperties: false
> > +    unevaluatedProperties: false
> 
> > Remove redundant LED properties inherited from common.yaml
> 
> But the pattern here suggests they aren't redundant, this is how you say
> "these properties are the only common ones allowed". You need to explain
> why other ones are valid to change this.
> 

I checked other LED dt-bindings and related driver code. 
This change is not suitable and will be dropped in V2.

> pw-bot: changes-requested
> (a commit message change is required at least)
> 
> > =20
> >  allOf:
> >    - $ref: input.yaml
> > @@ -158,7 +163,20 @@ allOf:
> >                - microchip,cap1298
> >      then:
> >        patternProperties:
> > -        "^led@[0-7]$": false
> > +        "^led@": false
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - microchip,cap1126
> > +    then:
> > +      patternProperties:
> > +        "^led@":
> > +          properties:
> > +            reg:
> > +              maximum: 1
> 
> I think these changes to permitted properties should be a standalone
> patch.

Agreed. I will split these changes into a standalone patch for V2.

> Thanks,
> Conor.
> 
> > =20
> >    - if:
> >        properties:
> > @@ -183,6 +201,9 @@ additionalProperties: false
> > =20
> >  examples:
> >    - |
> > +    #include <dt-bindings/gpio/gpio.h>
> > +    #include <dt-bindings/leds/common.h>
> > +
> >      i2c {
> >        #address-cells =3D <1>;
> >        #size-cells =3D <0>;
> > @@ -208,19 +229,21 @@ examples:
> >          #size-cells =3D <0>;
> > =20
> >          led@0 {
> > -                label =3D "cap11xx:green:usr0";
> >                  reg =3D <0>;
> > +                function =3D LED_FUNCTION_INDICATOR;
> > +                color =3D <LED_COLOR_ID_GREEN>;
> >          };
> > =20
> >          led@1 {
> > -                label =3D "cap11xx:green:usr1";
> >                  reg =3D <1>;
> > +                function =3D LED_FUNCTION_INDICATOR;
> > +                color =3D <LED_COLOR_ID_GREEN>;
> >          };
> > =20
> >          led@2 {
> > -                label =3D "cap11xx:green:alive";
> >                  reg =3D <2>;
> > -                linux,default-trigger =3D "heartbeat";
> > +                function =3D LED_FUNCTION_INDICATOR;
> > +                color =3D <LED_COLOR_ID_GREEN>;
> >          };
> >        };
> >      };
> > --=20
> > 2.54.0
> >=20

  reply	other threads:[~2026-06-09 13:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-06 15:03 [PATCH 0/8] Input: cap11xx - Add support for CAP1114 Jun Yan
2026-06-06 15:03 ` [PATCH 1/8] Input: cap11xx - clean up duplicate log and add probe error logs Jun Yan
2026-06-06 15:03 ` [PATCH 2/8] Input: cap11xx - remove unused register macros Jun Yan
2026-06-06 15:03 ` [PATCH 3/8] dt-bindings: input: microchip,cap11xx: Cleanup and refine LED constraints Jun Yan
2026-06-08 17:44   ` Conor Dooley
2026-06-09 13:56     ` Jun Yan [this message]
2026-06-06 15:03 ` [PATCH 4/8] dt-bindings: input: microchip,cap11xx: Add reset-gpios property Jun Yan
2026-06-06 15:18   ` sashiko-bot
2026-06-08 17:38   ` Conor Dooley
2026-06-06 15:03 ` [PATCH 5/8] Input: cap11xx - add reset gpio support Jun Yan
2026-06-06 15:13   ` sashiko-bot
2026-06-08 13:20     ` Jun Yan
2026-06-06 15:03 ` [PATCH 6/8] Input: cap11xx - refactor code for better CAP1114 support Jun Yan
2026-06-06 15:04 ` [PATCH 7/8] dt-bindings: input: microchip,cap11xx: Add " Jun Yan
2026-06-06 15:16   ` sashiko-bot
2026-06-08 13:27     ` Jun Yan
2026-06-08 17:38   ` Conor Dooley
2026-06-09 14:08     ` Jun Yan
2026-06-09 14:31       ` Conor Dooley
2026-06-06 15:04 ` [PATCH 8/8] Input: cap11xx - add support for CAP1114 Jun Yan
2026-06-06 15:20   ` sashiko-bot
2026-06-08 13:37     ` Jun Yan

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=20260609135603.848573-1-jerrysteve1101@gmail.com \
    --to=jerrysteve1101@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /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