Message ID | 20241105130322.213623-5-markus.burri@mt.com |
---|---|
State | New |
Headers | show |
Series | Input: matrix-keypad: Various performance improvements | expand |
On Tue, Nov 05, 2024 at 02:03:19PM +0100, Markus Burri wrote: > Add missing property 'gpio-activelow' to DT schema. What do you mean "missing property"? Why isn't it sufficient to mark the GPIOs as GPIO_ACTIVE_LOW in the various -gpios properties? > > Signed-off-by: Markus Burri <markus.burri@mt.com> > --- > .../devicetree/bindings/input/gpio-matrix-keypad.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml > index 745652b..9ea66b3 100644 > --- a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml > +++ b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml > @@ -51,6 +51,11 @@ properties: > (Legacy property supported: "linux,wakeup") > default: false > > + gpio-activelow: > + type: boolean > + description: The GPIOs are low active. > + default: false What you want is a flag, not a boolean here btw. Flags you can check for the presence of, booleans you cannot. > + > debounce-delay-ms: > description: Debounce interval in milliseconds. > default: 0 > -- > 2.39.5 >
Hi Conor, On Tue, Nov 05, 2024 at 06:22:36PM +0000, Conor Dooley wrote: > On Tue, Nov 05, 2024 at 02:03:19PM +0100, Markus Burri wrote: > > Add missing property 'gpio-activelow' to DT schema. > > What do you mean "missing property"? Why isn't it sufficient to mark the > GPIOs as GPIO_ACTIVE_LOW in the various -gpios properties? Unfortunately we do have "gpio-activelow" property already used in the driver since 2012 when DT support was added to the driver. This patch merely acknowledges that it is there. If DT maintainers wish to adjust known DTSes and switch to proper polarity annotation through gpio property I am all for it. > > > > > Signed-off-by: Markus Burri <markus.burri@mt.com> > > --- > > .../devicetree/bindings/input/gpio-matrix-keypad.yaml | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml > > index 745652b..9ea66b3 100644 > > --- a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml > > +++ b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml > > @@ -51,6 +51,11 @@ properties: > > (Legacy property supported: "linux,wakeup") > > default: false > > > > + gpio-activelow: > > + type: boolean > > + description: The GPIOs are low active. > > + default: false > > What you want is a flag, not a boolean here btw. Flags you can check for > the presence of, booleans you cannot. The behavior is fixed. If the flag is true GPIO is assumed to be active low, otherwise (and in the absence of the flag) GPIO is assumed to be active high. > > > + > > debounce-delay-ms: > > description: Debounce interval in milliseconds. > > default: 0 > > -- > > 2.39.5 > > Thanks.
diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml index 745652b..9ea66b3 100644 --- a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml +++ b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml @@ -51,6 +51,11 @@ properties: (Legacy property supported: "linux,wakeup") default: false + gpio-activelow: + type: boolean + description: The GPIOs are low active. + default: false + debounce-delay-ms: description: Debounce interval in milliseconds. default: 0
Add missing property 'gpio-activelow' to DT schema. Signed-off-by: Markus Burri <markus.burri@mt.com> --- .../devicetree/bindings/input/gpio-matrix-keypad.yaml | 5 +++++ 1 file changed, 5 insertions(+)