aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2009-07-23 00:51:34 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-23 04:15:09 -0400
commit4832958218f96f98009c5e01729fbe2b48c7124c (patch)
tree2bb83fbf9b9f2ef3d60d2a2e3e55fa1b42a1f847 /arch/blackfin/include
parent52ec7752b457311f10f5a8d16faa8ac2e684eb65 (diff)
Input: add Blackfin rotary input driver
This driver handles the Blackfin on-chip rotary peripheral. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r--arch/blackfin/include/asm/bfin_rotary.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/bfin_rotary.h b/arch/blackfin/include/asm/bfin_rotary.h
new file mode 100644
index 000000000000..425ece64fd5e
--- /dev/null
+++ b/arch/blackfin/include/asm/bfin_rotary.h
@@ -0,0 +1,39 @@
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
21struct 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