Skip to content

input: keypad-matrix: doc update, hw separation, polling, binary columns

Gerhard Sittig linux-arm-kernel linux-devicetree linux-input 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12input: matrix-keypad: update devicetree binding docDocumentation/devicetree/bindings/input/gpio-matrix-keypad.txt+36 -61 reply
1/12input: matrix-keypad: update devicetree binding doc+0 -01 reply
1/12input: matrix-keypad: update devicetree binding doc+0 -01 reply
1/12input: matrix-keypad: update devicetree binding doc+0 -00 replies
2/12input: matrix-keymap: func call coding style nitdrivers/input/matrix-keymap.c+10 -91 reply
2/12input: matrix-keymap: func call coding style nit+0 -01 reply
3/12input: matrix-keypad: rename variables and funcsdrivers/input/keyboard/matrix_keypad.c+12 -120 replies
4/12input: matrix-keypad: push/pull, separate polarityDocumentation/devicetree/bindings/input/gpio-matrix-keypad.txt arch/arm/mach-davinci/board-tnetv107x-evm.c arch/arm/mach-omap2/board-h4.c +4 more+66 -121 reply
4/12input: matrix-keypad: push/pull, separate polarity+0 -01 reply
4/12input: matrix-keypad: push/pull, separate polarity+0 -01 reply
4/12input: matrix-keypad: push/pull, separate polarity+0 -00 replies
5/12input: matrix-keypad: update comments, diagnosticsdrivers/input/keyboard/matrix_keypad.c drivers/input/matrix-keymap.c include/linux/input/matrix_keypad.h+89 -131 reply
6/12input: keypad-matrix: refactor matrix scan logicdrivers/input/keyboard/matrix_keypad.c+30 -130 replies
7/12input: keypad-matrix: introduce polling supportDocumentation/devicetree/bindings/input/gpio-matrix-keypad.txt drivers/input/keyboard/matrix_keypad.c include/linux/input/matrix_keypad.h+107 -61 reply
7/12input: keypad-matrix: introduce polling support+0 -01 reply
8/12input: keypad-matrix: tell GPIO pins from matrix linesDocumentation/devicetree/bindings/input/gpio-matrix-keypad.txt drivers/input/keyboard/matrix_keypad.c include/linux/input/matrix_keypad.h+57 -151 reply
8/12input: keypad-matrix: tell GPIO pins from matrix lines+0 -01 reply
8/12input: keypad-matrix: tell GPIO pins from matrix lines+0 -02 replies
8/12input: keypad-matrix: tell GPIO pins from matrix lines+0 -00 replies
9/12input: matrix-keypad: add binary column encodingDocumentation/devicetree/bindings/input/gpio-matrix-keypad.txt drivers/input/keyboard/matrix_keypad.c include/linux/input/matrix_keypad.h+83 -51 reply
10/12input: keypad_matrix: use usleep_range() for scan delayDocumentation/devicetree/bindings/input/gpio-matrix-keypad.txt drivers/input/keyboard/matrix_keypad.c include/linux/input/matrix_keypad.h+35 -61 reply
10/12input: keypad_matrix: use usleep_range() for scan delay+0 -01 reply
11/12input: keypad-matrix: AC14xx device tree updatearch/powerpc/boot/dts/ac14xx.dts+7 -60 replies
12/12input: matrix-keypad: add diagnostics in probe()drivers/input/keyboard/matrix_keypad.c+18 -01 reply
12/12input: matrix-keypad: add diagnostics in probe()+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 00/12] input: keypad-matrix: doc update, hw separation, polling, binary columns

this series addresses one style nit in the matrix-keymap helper (bool vs error code for function calls), and brings the following changes to the matrix-keypad driver
- documentation update (device tree bindings), comments update (driver's program flow as well as data structures), diagnostics rephrased
- more finegrained hardware control (individual polarity for row and for column pins, push-pull operation of column pins)
- clean separation of the physical hardware attachment and the logical keyboard handling (tell GPIO pins and matrix lines apart)
- introduce support for polling vs interrupt driven change detection (more reliable detection of multi key press events)
- optionally reduce timer management overhead by using a range instead of a fixed value for a microseconds delay
- introduce support for keyboard layouts where fewer column gpio pins control more matrix column lines (binary column address encoding)
- adapt a board's device tree to the new features

for unadjusted code and configuration the behaviour remains fully backwards compatible, using any of the new features is completely optional

I'm aware of my introducing many new options, and not removing any of the flexibility to reduce complexity -- but I feel that there's nothing that can get removed without breaking compatibility, while all of the new options and features are desirable or just essential for the end result of binary encoded columns with push/pull requirements for the pins including reliable detection of multi key press events

even if it were not for the binary column addressing, most of the changes are desirable and removing the binary encoding doesn't significantly cut on the complexity

I'd happily trim flexibility and reduce complexity if it turns out that the former support which I did not want to break isn't required any longer (the open collector emulation might be one such candidate)

the series was build tested on PowerPC (mpc512x generic plus matrix-keypad), ARM (omap2plus plus matrix-keypad) and MIPS (bcm47xx plus matrix-keypad) and was run tested on PowerPC (mpc512x generic on an ifm AC14xx board)

test feedback from ARM users (palm tungsten, spitz, corgi with platform data, any recent ARM with matrix-keypad and device tree) is very welcome and greatly appreciated

the series is checkpatch clean in regular mode, and spots one condition in strict mode which I consider acceptable since memset() would be too much for two u32 values and individual assignments appear clumsy to me in this very case

CHECK: multiple assignments should be avoided #114: FILE: drivers/input/keyboard/matrix_keypad.c:671:
+ us[0] = us[1] = 0;

total: 0 errors, 0 warnings, 1 checks, 95 lines checked

Gerhard Sittig (12):
input: matrix-keypad: update devicetree binding doc
input: matrix-keymap: func call coding style nit
input: matrix-keypad: rename variables and funcs
input: matrix-keypad: push/pull, separate polarity
input: matrix-keypad: update comments, diagnostics
input: keypad-matrix: refactor matrix scan logic
input: keypad-matrix: introduce polling support
input: keypad-matrix: tell GPIO pins from matrix lines
input: matrix-keypad: add binary column encoding
input: keypad_matrix: use usleep_range() for scan delay
input: keypad-matrix: AC14xx device tree update
input: matrix-keypad: add diagnostics in probe()

 .../bindings/input/gpio-matrix-keypad.txt          |  138 ++++++-
 arch/arm/mach-davinci/board-tnetv107x-evm.c        |    3 +-
 arch/arm/mach-omap2/board-h4.c                     |    3 +-
 arch/arm/mach-pxa/palmtc.c                         |    3 +-
 arch/mips/jz4740/board-qi_lb60.c                   |    3 +-
 arch/powerpc/boot/dts/ac14xx.dts                   |   13 +-
 drivers/input/keyboard/matrix_keypad.c             |  399 +++++++++++++++++---
 drivers/input/matrix-keymap.c                      |   23 +-
 include/linux/input/matrix_keypad.h                |   44 ++-
 9 files changed, 538 insertions(+), 91 deletions(-)
Signature · 1 line
1.7.10.4