• E
    Input: pxa27x_keypad - introduce driver structure and use KEY() to define matrix keys · 1814db69
    Eric Miao 提交于
     1. Introduce the "struct pxa27x_keypad" structure for driver specific
        information, such as "struct clk", generated matrix key codes and
        so on
    
     2. Use KEY() macro to define matrix keys, instead of original 8x8 map
        this makes definition easier with keypad where keys are sparse
    
     3. Keep a generated array in "struct pxa27x_keypad" for fast lookup
    
     4. Separate the matrix scan into a dedicated function for readability
        and report only those keys whose state has been changed, instead
        of report all states
    
     5. Make use of KPAS to decide the faster path if only one key has been
        detected
    Signed-off-by: NEric Miao <eric.miao@marvell.com>
    Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
    1814db69
pxa27x_keypad.c 9.0 KB