All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: "Rob Herring" <robh@kernel.org>, "Nuno Sá" <nuno.sa@analog.com>
Cc: linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-input@vger.kernel.org,
	"Lee Jones" <lee@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Uwe Kleine-König" <ukleinek@kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Liu Ying" <victor.liu@nxp.com>
Subject: Re: [PATCH 09/18] dt-bindings: mfd: adp5585: add properties for input events
Date: Mon, 17 Mar 2025 16:08:28 +0000	[thread overview]
Message-ID: <f6b32aa2dc60d14eae2afa7be3754c3f23c431b1.camel@gmail.com> (raw)
In-Reply-To: <20250317155300.GA4188705-robh@kernel.org>

On Mon, 2025-03-17 at 10:53 -0500, Rob Herring wrote:
> On Thu, Mar 13, 2025 at 02:19:26PM +0000, Nuno Sá wrote:
> > Add properties related to input events. These devices can act as
> > keyboards and can support events either via a keymap Matrix or through
> > GPIs. Note that the device needs to be an interrupt controller for GPIs
> > based events.
> > 
> > We specifically need a property specifying the pins used by the keymap
> > matrix since these devices have no requirement for rows and columns to be
> > contiguous without holes which is enforced by the standard input
> > properties.
> > 
> > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > ---
> >  .../devicetree/bindings/mfd/adi,adp5585.yaml       | 188
> > ++++++++++++++++++++-
> >  1 file changed, 187 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml
> > b/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml
> > index
> > 87256a37b5f4b6a019f581b164c276d8805d2e52..e976c9240df79afae1d0949e6ac91d477b
> > faceef 100644
> > --- a/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml
> > @@ -49,6 +49,85 @@ properties:
> >    "#pwm-cells":
> >      const: 3
> >  
> > +  interrupt-controller: true
> > +
> > +  '#interrupt-cells':
> > +    const: 2
> > +
> > +  adi,keypad-pins:
> > +    description: Specifies the pins used for the keypad matrix.
> > +    $ref: /schemas/types.yaml#/definitions/uint32-array
> 
> I would would assume there's a minimum of 3 pins (unless someone wants 
> to implement 1 key with 2 pins) and a maximum number of pins the chip 
> supports. And what about constraints on the values of each entry?
> 

Yeah, I have the minimum as 2 pins. I define those constrains bellow in the
allOf. I though I could have a default in here and then later overwrite it but
that was not working when validating different combinations of values.

> > +
> > +  adi,key-poll-ms:
> > +    description: Configure time between consecutive scan cycles.
> > +    enum: [10, 20, 30, 40]
> > +    default: 10
> 
> Use the common property "poll-interval".

ack

> 
> > +
> > +  adi,unlock-keys:
> > +    description:
> > +      Specifies a maximum of 2 keys that can be used to unlock the keypad.
> > +      If this property is set, the keyboard will be locked and only
> > unlocked
> > +      after these keys are pressed. The value 127 serves as a wildcard
> > which
> > +      means any key can be used for unlocking.
> > +    $ref: /schemas/types.yaml#/definitions/uint32-array
> > +    minItems: 1
> > +    maxItems: 2
> > +    items:
> > +      anyOf:
> > +        - minimum: 1
> > +          maximum: 88
> > +        - minimum: 97
> > +          maximum: 115
> > +        - const: 127
> > +
> > +  adi,unlock-trigger-sec:
> > +    description:
> > +      Defines the time in which the second unlock event must occur after
> > the
> > +      first unlock event has occurred.
> > +    maximum: 7
> > +    default: 0
> > +
> > +  adi,reset1-keys:
> > +    description:
> > +      Defines the trigger events (key presses) that can generate reset
> > +      conditions one the reset1 block.
> 
> Are these in raw key values or keymap values?
> 

These are the events number as defined in the datasheet. So, yes, raw values.

- Nuno Sá

> 

  reply	other threads:[~2025-03-17 16:08 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 14:19 [PATCH 00/18] mfd: adp5585: support keymap events and drop legacy Input driver Nuno Sá
2025-03-13 14:19 ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 01/18] dt-bindings: mfd: adp5585: ease on the required properties Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 02/18] mfd: adp5585: enable oscilator during probe Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 03/18] pwm: adp5585: don't control OSC_EN in the pwm driver Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 04/18] mfd: adp5585: make use of MFD_CELL_NAME() Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 05/18] dt-bindings: mfd: adp5585: document adp5589 I/O expander Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-14  8:49   ` Krzysztof Kozlowski
2025-03-14  9:38     ` Nuno Sá
2025-03-17  7:41       ` Krzysztof Kozlowski
2025-03-17  9:30         ` Nuno Sá
2025-03-17 10:41           ` Krzysztof Kozlowski
2025-03-13 14:19 ` [PATCH 06/18] mfd: adp5585: add support for adp5589 Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-14  9:12   ` kernel test robot
2025-03-14  9:23   ` kernel test robot
2025-03-14  9:32     ` Nuno Sá
2025-03-13 14:19 ` [PATCH 07/18] gpio: adp5585: add support for the ad5589 expander Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-14 10:53   ` Linus Walleij
2025-03-13 14:19 ` [PATCH 08/18] pwm: adp5585: add support for adp5589 Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 09/18] dt-bindings: mfd: adp5585: add properties for input events Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-17 15:53   ` Rob Herring
2025-03-17 16:08     ` Nuno Sá [this message]
2025-03-13 14:19 ` [PATCH 10/18] mfd: adp5585: add support for key events Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-14  9:43   ` kernel test robot
2025-03-13 14:19 ` [PATCH 11/18] gpio: adp5585: support gpi events Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-14 10:54   ` Linus Walleij
2025-03-13 14:19 ` [PATCH 12/18] Input: adp5585: Add Analog Devices ADP5585/89 support Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 13/18] Input: adp5589: remove the driver Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 14/18] mfd: adp5585: support getting vdd regulator Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 15/18] dt-bindings: mfd: adp5585: document reset gpio Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-14  8:52   ` Krzysztof Kozlowski
2025-03-13 14:19 ` [PATCH 16/18] mfd: adp5585: add support for a reset pin Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 17/18] pwm: adp5585: make sure to include mod_devicetable.h Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay
2025-03-13 14:19 ` [PATCH 18/18] gpio: " Nuno Sá
2025-03-13 14:19   ` Nuno Sá via B4 Relay

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=f6b32aa2dc60d14eae2afa7be3754c3f23c431b1.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=ukleinek@kernel.org \
    --cc=victor.liu@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.