Skip to content
  • Aseda Aboagye's avatar
    cros_ec: Change keyboard scanning method. · f88af26b
    Aseda Aboagye authored
    
    
    The Matrix KeyBoard Protocol (MKBP) was recently extended to support
    reporting button and switch events. Consequently, support for the
    EC_CMD_MKBP_GET_STATE host command was dropped since the keyboard FIFO
    became a general MKBP events FIFO and that host command assumed that the
    FIFO was strictly for keyboard matrices.  This has been superseded by the
    EC_CMD_GET_NEXT_EVENT host command.
    
    Currently, button and switch events may be present in the FIFO, but we
    will just ignore those and drop them on the floor.  For those buttons
    and switches that we care about, they are handled in different ways.
    
    This commit introduces a new Kconfig:
    
        CONFIG_DRIVER_INPUT_MKBP_OLD_COMMAND
    
    This config option should be used to enable retrieving of key matrix
    changes via EC_CMD_MKBP_GET_STATE. This is for legacy Chrome ECs where
    the MKBP FIFO was solely just a key matrix FIFO.
    
    BUG=chromium:626863
    BRANCH=None
    TEST=Verify that keypresses are recognized during FW screens on kevin.
    TEST=Verify that button presses and other events are ignored during FW
    screens on kevin.
    
    CQ-DEPEND=CL:358926
    
    Change-Id: Ia9cf29b063178b9eca20e9d2602dc91308e56d4a
    Signed-off-by: default avatarAseda Aboagye <aaboagye@google.com>
    Reviewed-on: https://chromium-review.googlesource.com/358989
    
    
    Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
    Tested-by: default avatarAseda Aboagye <aaboagye@chromium.org>
    Reviewed-by: default avatarJulius Werner <jwerner@chromium.org>
    f88af26b