Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) ST-Ericsson SA 2010
0004  *
0005  * Author: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
0006  *
0007  * ux500 Scroll key and Keypad Encoder (SKE) header
0008  */
0009 
0010 #ifndef __SKE_H
0011 #define __SKE_H
0012 
0013 #include <linux/input/matrix_keypad.h>
0014 
0015 /* register definitions for SKE peripheral */
0016 #define SKE_CR      0x00
0017 #define SKE_VAL0    0x04
0018 #define SKE_VAL1    0x08
0019 #define SKE_DBCR    0x0C
0020 #define SKE_IMSC    0x10
0021 #define SKE_RIS     0x14
0022 #define SKE_MIS     0x18
0023 #define SKE_ICR     0x1C
0024 
0025 /*
0026  * Keypad module
0027  */
0028 
0029 /**
0030  * struct keypad_platform_data - structure for platform specific data
0031  * @init:   pointer to keypad init function
0032  * @exit:   pointer to keypad deinitialisation function
0033  * @keymap_data: matrix scan code table for keycodes
0034  * @krow:   maximum number of rows
0035  * @kcol:   maximum number of columns
0036  * @debounce_ms: platform specific debounce time
0037  * @no_autorepeat: flag for auto repetition
0038  * @wakeup_enable: allow waking up the system
0039  */
0040 struct ske_keypad_platform_data {
0041     int (*init)(void);
0042     int (*exit)(void);
0043     const struct matrix_keymap_data *keymap_data;
0044     u8 krow;
0045     u8 kcol;
0046     u8 debounce_ms;
0047     bool no_autorepeat;
0048     bool wakeup_enable;
0049 };
0050 #endif  /*__SKE_KPD_H*/