mm-only debug patch...
[mmotm.git] / arch / blackfin / include / asm / bfin_rotary.h
blobabdb2af529027877ade494101030808cab81ac00
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".
5 * Copyright 2008 Analog Devices Inc.
7 * Licensed under the GPL-2 or later.
8 */
10 #ifndef _BFIN_ROTARY_H
11 #define _BFIN_ROTARY_H
13 /* mode bitmasks */
14 #define ROT_QUAD_ENC CNTMODE_QUADENC /* quadrature/grey code encoder mode */
15 #define ROT_BIN_ENC CNTMODE_BINENC /* binary encoder mode */
16 #define ROT_UD_CNT CNTMODE_UDCNT /* rotary counter mode */
17 #define ROT_DIR_CNT CNTMODE_DIRCNT /* direction counter mode */
19 #define ROT_DEBE DEBE /* Debounce Enable */
21 #define ROT_CDGINV CDGINV /* CDG Pin Polarity Invert */
22 #define ROT_CUDINV CUDINV /* CUD Pin Polarity Invert */
23 #define ROT_CZMINV CZMINV /* CZM Pin Polarity Invert */
25 struct bfin_rotary_platform_data {
26 /* set rotary UP KEY_### or BTN_### in case you prefer
27 * bfin-rotary to send EV_KEY otherwise set 0
29 unsigned int rotary_up_key;
30 /* set rotary DOWN KEY_### or BTN_### in case you prefer
31 * bfin-rotary to send EV_KEY otherwise set 0
33 unsigned int rotary_down_key;
34 /* set rotary BUTTON KEY_### or BTN_### */
35 unsigned int rotary_button_key;
36 /* set rotary Relative Axis REL_### in case you prefer
37 * bfin-rotary to send EV_REL otherwise set 0
39 unsigned int rotary_rel_code;
40 unsigned short debounce; /* 0..17 */
41 unsigned short mode;
43 #endif