Merge branch 'fix/hda' into topic/hda
[sfrench/cifs-2.6.git] / arch / blackfin / include / asm / bfin_rotary.h
1 /*
2  * board initialization should put one of these structures into platform_data
3  * and place the bfin-rotary onto platform_bus named "bfin-rotary".
4  */
5
6 #ifndef _BFIN_ROTARY_H
7 #define _BFIN_ROTARY_H
8
9 /* mode bitmasks */
10 #define ROT_QUAD_ENC    CNTMODE_QUADENC /* quadrature/grey code encoder mode */
11 #define ROT_BIN_ENC     CNTMODE_BINENC  /* binary encoder mode */
12 #define ROT_UD_CNT      CNTMODE_UDCNT   /* rotary counter mode */
13 #define ROT_DIR_CNT     CNTMODE_DIRCNT  /* direction counter mode */
14
15 #define ROT_DEBE        DEBE            /* Debounce Enable */
16
17 #define ROT_CDGINV      CDGINV          /* CDG Pin Polarity Invert */
18 #define ROT_CUDINV      CUDINV          /* CUD Pin Polarity Invert */
19 #define ROT_CZMINV      CZMINV          /* CZM Pin Polarity Invert */
20
21 struct bfin_rotary_platform_data {
22         /* set rotary UP KEY_### or BTN_### in case you prefer
23          * bfin-rotary to send EV_KEY otherwise set 0
24          */
25         unsigned int rotary_up_key;
26         /* set rotary DOWN KEY_### or BTN_### in case you prefer
27          * bfin-rotary to send EV_KEY otherwise set 0
28          */
29         unsigned int rotary_down_key;
30         /* set rotary BUTTON KEY_### or BTN_### */
31         unsigned int rotary_button_key;
32         /* set rotary Relative Axis REL_### in case you prefer
33          * bfin-rotary to send EV_REL otherwise set 0
34          */
35         unsigned int rotary_rel_code;
36         unsigned short debounce;        /* 0..17 */
37         unsigned short mode;
38 };
39 #endif