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@xxxxxxxxxx> > > --- > > .../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á >