aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/input.h1
-rw-r--r--include/linux/input/ad714x.h63
-rw-r--r--include/linux/serio.h1
-rw-r--r--include/linux/sysrq.h23
-rw-r--r--include/linux/tca6416_keypad.h34
5 files changed, 107 insertions, 15 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 7ed2251b33f..83524e4f329 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -806,6 +806,7 @@ struct input_absinfo {
806#define BUS_HOST 0x19 806#define BUS_HOST 0x19
807#define BUS_GSC 0x1A 807#define BUS_GSC 0x1A
808#define BUS_ATARI 0x1B 808#define BUS_ATARI 0x1B
809#define BUS_SPI 0x1C
809 810
810/* 811/*
811 * MT_TOOL types 812 * MT_TOOL types
diff --git a/include/linux/input/ad714x.h b/include/linux/input/ad714x.h
new file mode 100644
index 00000000000..0cbe5e81482
--- /dev/null
+++ b/include/linux/input/ad714x.h
@@ -0,0 +1,63 @@
1/*
2 * include/linux/input/ad714x.h
3 *
4 * AD714x is very flexible, it can be used as buttons, scrollwheel,
5 * slider, touchpad at the same time. That depends on the boards.
6 * The platform_data for the device's "struct device" holds this
7 * information.
8 *
9 * Copyright 2009 Analog Devices Inc.
10 *
11 * Licensed under the GPL-2 or later.
12 */
13
14#ifndef __LINUX_INPUT_AD714X_H__
15#define __LINUX_INPUT_AD714X_H__
16
17#define STAGE_NUM 12
18#define STAGE_CFGREG_NUM 8
19#define SYS_CFGREG_NUM 8
20
21/* board information which need be initialized in arch/mach... */
22struct ad714x_slider_plat {
23 int start_stage;
24 int end_stage;
25 int max_coord;
26};
27
28struct ad714x_wheel_plat {
29 int start_stage;
30 int end_stage;
31 int max_coord;
32};
33
34struct ad714x_touchpad_plat {
35 int x_start_stage;
36 int x_end_stage;
37 int x_max_coord;
38
39 int y_start_stage;
40 int y_end_stage;
41 int y_max_coord;
42};
43
44struct ad714x_button_plat {
45 int keycode;
46 unsigned short l_mask;
47 unsigned short h_mask;
48};
49
50struct ad714x_platform_data {
51 int slider_num;
52 int wheel_num;
53 int touchpad_num;
54 int button_num;
55 struct ad714x_slider_plat *slider;
56 struct ad714x_wheel_plat *wheel;
57 struct ad714x_touchpad_plat *touchpad;
58 struct ad714x_button_plat *button;
59 unsigned short stage_cfg_reg[STAGE_NUM][STAGE_CFGREG_NUM];
60 unsigned short sys_cfg_reg[SYS_CFGREG_NUM];
61};
62
63#endif
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 64b473066b9..b5552568178 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -196,5 +196,6 @@ static inline void serio_continue_rx(struct serio *serio)
196#define SERIO_TOUCHIT213 0x38 196#define SERIO_TOUCHIT213 0x38
197#define SERIO_W8001 0x39 197#define SERIO_W8001 0x39
198#define SERIO_DYNAPRO 0x3a 198#define SERIO_DYNAPRO 0x3a
199#define SERIO_HAMPSHIRE 0x3b
199 200
200#endif 201#endif
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
index 99adcdc0d3c..4496322e28d 100644
--- a/include/linux/sysrq.h
+++ b/include/linux/sysrq.h
@@ -39,41 +39,34 @@ struct sysrq_key_op {
39 39
40#ifdef CONFIG_MAGIC_SYSRQ 40#ifdef CONFIG_MAGIC_SYSRQ
41 41
42extern int sysrq_on(void);
43
44/*
45 * Do not use this one directly:
46 */
47extern int __sysrq_enabled;
48
49/* Generic SysRq interface -- you may call it from any device driver, supplying 42/* Generic SysRq interface -- you may call it from any device driver, supplying
50 * ASCII code of the key, pointer to registers and kbd/tty structs (if they 43 * ASCII code of the key, pointer to registers and kbd/tty structs (if they
51 * are available -- else NULL's). 44 * are available -- else NULL's).
52 */ 45 */
53 46
54void handle_sysrq(int key, struct tty_struct *tty); 47void handle_sysrq(int key, struct tty_struct *tty);
55void __handle_sysrq(int key, struct tty_struct *tty, int check_mask);
56int register_sysrq_key(int key, struct sysrq_key_op *op); 48int register_sysrq_key(int key, struct sysrq_key_op *op);
57int unregister_sysrq_key(int key, struct sysrq_key_op *op); 49int unregister_sysrq_key(int key, struct sysrq_key_op *op);
58struct sysrq_key_op *__sysrq_get_key_op(int key); 50struct sysrq_key_op *__sysrq_get_key_op(int key);
59 51
52int sysrq_toggle_support(int enable_mask);
53
60#else 54#else
61 55
62static inline int sysrq_on(void) 56static inline void handle_sysrq(int key, struct tty_struct *tty)
63{ 57{
64 return 0;
65} 58}
66static inline int __reterr(void) 59
60static inline int register_sysrq_key(int key, struct sysrq_key_op *op)
67{ 61{
68 return -EINVAL; 62 return -EINVAL;
69} 63}
70static inline void handle_sysrq(int key, struct tty_struct *tty) 64
65static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op)
71{ 66{
67 return -EINVAL;
72} 68}
73 69
74#define register_sysrq_key(ig,nore) __reterr()
75#define unregister_sysrq_key(ig,nore) __reterr()
76
77#endif 70#endif
78 71
79#endif /* _LINUX_SYSRQ_H */ 72#endif /* _LINUX_SYSRQ_H */
diff --git a/include/linux/tca6416_keypad.h b/include/linux/tca6416_keypad.h
new file mode 100644
index 00000000000..7bd266f3525
--- /dev/null
+++ b/include/linux/tca6416_keypad.h
@@ -0,0 +1,34 @@
1/*
2 * tca6416 keypad platform support
3 *
4 * Copyright (C) 2010 Texas Instruments
5 *
6 * Author: Sriramakrishnan <srk@ti.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef _TCA6416_KEYS_H
14#define _TCA6416_KEYS_H
15
16#include <linux/types.h>
17
18struct tca6416_button {
19 /* Configuration parameters */
20 int code; /* input event code (KEY_*, SW_*) */
21 int active_low;
22 int type; /* input event type (EV_KEY, EV_SW) */
23};
24
25struct tca6416_keys_platform_data {
26 struct tca6416_button *buttons;
27 int nbuttons;
28 unsigned int rep:1; /* enable input subsystem auto repeat */
29 uint16_t pinmask;
30 uint16_t invert;
31 int irq_is_gpio;
32 int use_polling; /* use polling if Interrupt is not connected*/
33};
34#endif