aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/input
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/input')
-rw-r--r--include/linux/input/lm8333.h24
-rw-r--r--include/linux/input/matrix_keypad.h54
-rw-r--r--include/linux/input/navpoint.h12
3 files changed, 41 insertions, 49 deletions
diff --git a/include/linux/input/lm8333.h b/include/linux/input/lm8333.h
new file mode 100644
index 000000000000..79f918c6e8c5
--- /dev/null
+++ b/include/linux/input/lm8333.h
@@ -0,0 +1,24 @@
1/*
2 * public include for LM8333 keypad driver - same license as driver
3 * Copyright (C) 2012 Wolfram Sang, Pengutronix <w.sang@pengutronix.de>
4 */
5
6#ifndef _LM8333_H
7#define _LM8333_H
8
9struct lm8333;
10
11struct lm8333_platform_data {
12 /* Keymap data */
13 const struct matrix_keymap_data *matrix_data;
14 /* Active timeout before enter HALT mode in microseconds */
15 unsigned active_time;
16 /* Debounce interval in microseconds */
17 unsigned debounce_time;
18};
19
20extern int lm8333_read8(struct lm8333 *lm8333, u8 cmd);
21extern int lm8333_write8(struct lm8333 *lm8333, u8 cmd, u8 val);
22extern int lm8333_read_block(struct lm8333 *lm8333, u8 cmd, u8 len, u8 *buf);
23
24#endif /* _LM8333_H */
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h
index 6c07ced0af81..5f3aa6b11bfa 100644
--- a/include/linux/input/matrix_keypad.h
+++ b/include/linux/input/matrix_keypad.h
@@ -75,54 +75,10 @@ struct matrix_keypad_platform_data {
75 bool no_autorepeat; 75 bool no_autorepeat;
76}; 76};
77 77
78/** 78int matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
79 * matrix_keypad_build_keymap - convert platform keymap into matrix keymap 79 const char *keymap_name,
80 * @keymap_data: keymap supplied by the platform code 80 unsigned int rows, unsigned int cols,
81 * @row_shift: number of bits to shift row value by to advance to the next 81 unsigned short *keymap,
82 * line in the keymap 82 struct input_dev *input_dev);
83 * @keymap: expanded version of keymap that is suitable for use by
84 * matrix keyboad driver
85 * @keybit: pointer to bitmap of keys supported by input device
86 *
87 * This function converts platform keymap (encoded with KEY() macro) into
88 * an array of keycodes that is suitable for using in a standard matrix
89 * keyboard driver that uses row and col as indices.
90 */
91static inline void
92matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
93 unsigned int row_shift,
94 unsigned short *keymap, unsigned long *keybit)
95{
96 int i;
97
98 for (i = 0; i < keymap_data->keymap_size; i++) {
99 unsigned int key = keymap_data->keymap[i];
100 unsigned int row = KEY_ROW(key);
101 unsigned int col = KEY_COL(key);
102 unsigned short code = KEY_VAL(key);
103
104 keymap[MATRIX_SCAN_CODE(row, col, row_shift)] = code;
105 __set_bit(code, keybit);
106 }
107 __clear_bit(KEY_RESERVED, keybit);
108}
109
110#ifdef CONFIG_INPUT_OF_MATRIX_KEYMAP
111struct matrix_keymap_data *
112matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname);
113
114void matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd);
115#else
116static inline struct matrix_keymap_data *
117matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname)
118{
119 return NULL;
120}
121
122static inline void
123matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd)
124{
125}
126#endif
127 83
128#endif /* _MATRIX_KEYPAD_H */ 84#endif /* _MATRIX_KEYPAD_H */
diff --git a/include/linux/input/navpoint.h b/include/linux/input/navpoint.h
new file mode 100644
index 000000000000..45050eb34de3
--- /dev/null
+++ b/include/linux/input/navpoint.h
@@ -0,0 +1,12 @@
1/*
2 * Copyright (C) 2012 Paul Parsons <lost.distance@yahoo.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9struct navpoint_platform_data {
10 int port; /* PXA SSP port for pxa_ssp_request() */
11 int gpio; /* GPIO for power on/off */
12};