Skip to content

Investigate matrix_keypad linux driver #127

@amclain

Description

@amclain

Linux has a built-in matrix_keypad driver that we may be able to use for scanning and programming the keyboard matrix.

Example device tree:

        matrix_keypad: matrix_keypad0 {
                compatible = "gpio-matrix-keypad";
                debounce-delay-ms = <5>;
                col-scan-delay-us = <2>;
                row-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH         /* Bank1, pin25 */
                             &gpio1 26 GPIO_ACTIVE_HIGH         /* Bank1, pin26 */
                             &gpio1 27 GPIO_ACTIVE_HIGH>;       /* Bank1, pin27 */
                col-gpios = <&gpio1 21 GPIO_ACTIVE_HIGH         /* Bank1, pin21 */
                             &gpio1 22 GPIO_ACTIVE_HIGH>;       /* Bank1, pin22 */
                linux,keymap = <0x0000008b      /* MENU */
                                0x0100009e      /* BACK */
                                0x02000069      /* LEFT */
                                0x0001006a      /* RIGHT */
                                0x0101001c      /* ENTER */
                                0x0201006c>;    /* DOWN */
        };  

See dt-bindings/input/linux-event-codes.h.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions