Rev 422 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
422 | giacomo | 1 | /* |
2 | * Sony Programmable I/O Control Device driver for VAIO |
||
3 | * |
||
4 | * Copyright (C) 2001-2003 Stelian Pop <stelian@popies.net> |
||
5 | * |
||
6 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> |
||
7 | * |
||
8 | * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> |
||
9 | * |
||
10 | * Copyright (C) 2001 Junichi Morita <jun1m@mars.dti.ne.jp> |
||
11 | * |
||
12 | * Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp> |
||
13 | * |
||
14 | * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> |
||
15 | * |
||
16 | * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras. |
||
17 | * |
||
18 | * This program is free software; you can redistribute it and/or modify |
||
19 | * it under the terms of the GNU General Public License as published by |
||
20 | * the Free Software Foundation; either version 2 of the License, or |
||
21 | * (at your option) any later version. |
||
22 | * |
||
23 | * This program is distributed in the hope that it will be useful, |
||
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
26 | * GNU General Public License for more details. |
||
27 | * |
||
28 | * You should have received a copy of the GNU General Public License |
||
29 | * along with this program; if not, write to the Free Software |
||
30 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||
31 | * |
||
32 | */ |
||
33 | |||
34 | #ifndef _SONYPI_H_ |
||
35 | #define _SONYPI_H_ |
||
36 | |||
37 | #include <linux/types.h> |
||
38 | |||
39 | /* events the user application reading /dev/sonypi can use */ |
||
40 | |||
41 | #define SONYPI_EVENT_JOGDIAL_DOWN 1 |
||
42 | #define SONYPI_EVENT_JOGDIAL_UP 2 |
||
43 | #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3 |
||
44 | #define SONYPI_EVENT_JOGDIAL_UP_PRESSED 4 |
||
45 | #define SONYPI_EVENT_JOGDIAL_PRESSED 5 |
||
46 | #define SONYPI_EVENT_JOGDIAL_RELEASED 6 /* obsolete */ |
||
47 | #define SONYPI_EVENT_CAPTURE_PRESSED 7 |
||
48 | #define SONYPI_EVENT_CAPTURE_RELEASED 8 /* obsolete */ |
||
49 | #define SONYPI_EVENT_CAPTURE_PARTIALPRESSED 9 |
||
50 | #define SONYPI_EVENT_CAPTURE_PARTIALRELEASED 10 |
||
51 | #define SONYPI_EVENT_FNKEY_ESC 11 |
||
52 | #define SONYPI_EVENT_FNKEY_F1 12 |
||
53 | #define SONYPI_EVENT_FNKEY_F2 13 |
||
54 | #define SONYPI_EVENT_FNKEY_F3 14 |
||
55 | #define SONYPI_EVENT_FNKEY_F4 15 |
||
56 | #define SONYPI_EVENT_FNKEY_F5 16 |
||
57 | #define SONYPI_EVENT_FNKEY_F6 17 |
||
58 | #define SONYPI_EVENT_FNKEY_F7 18 |
||
59 | #define SONYPI_EVENT_FNKEY_F8 19 |
||
60 | #define SONYPI_EVENT_FNKEY_F9 20 |
||
61 | #define SONYPI_EVENT_FNKEY_F10 21 |
||
62 | #define SONYPI_EVENT_FNKEY_F11 22 |
||
63 | #define SONYPI_EVENT_FNKEY_F12 23 |
||
64 | #define SONYPI_EVENT_FNKEY_1 24 |
||
65 | #define SONYPI_EVENT_FNKEY_2 25 |
||
66 | #define SONYPI_EVENT_FNKEY_D 26 |
||
67 | #define SONYPI_EVENT_FNKEY_E 27 |
||
68 | #define SONYPI_EVENT_FNKEY_F 28 |
||
69 | #define SONYPI_EVENT_FNKEY_S 29 |
||
70 | #define SONYPI_EVENT_FNKEY_B 30 |
||
71 | #define SONYPI_EVENT_BLUETOOTH_PRESSED 31 |
||
72 | #define SONYPI_EVENT_PKEY_P1 32 |
||
73 | #define SONYPI_EVENT_PKEY_P2 33 |
||
74 | #define SONYPI_EVENT_PKEY_P3 34 |
||
75 | #define SONYPI_EVENT_BACK_PRESSED 35 |
||
76 | #define SONYPI_EVENT_LID_CLOSED 36 |
||
77 | #define SONYPI_EVENT_LID_OPENED 37 |
||
78 | #define SONYPI_EVENT_BLUETOOTH_ON 38 |
||
79 | #define SONYPI_EVENT_BLUETOOTH_OFF 39 |
||
80 | #define SONYPI_EVENT_HELP_PRESSED 40 |
||
81 | #define SONYPI_EVENT_FNKEY_ONLY 41 |
||
82 | #define SONYPI_EVENT_JOGDIAL_FAST_DOWN 42 |
||
83 | #define SONYPI_EVENT_JOGDIAL_FAST_UP 43 |
||
84 | #define SONYPI_EVENT_JOGDIAL_FAST_DOWN_PRESSED 44 |
||
85 | #define SONYPI_EVENT_JOGDIAL_FAST_UP_PRESSED 45 |
||
86 | #define SONYPI_EVENT_JOGDIAL_VFAST_DOWN 46 |
||
87 | #define SONYPI_EVENT_JOGDIAL_VFAST_UP 47 |
||
88 | #define SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED 48 |
||
89 | #define SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED 49 |
||
90 | #define SONYPI_EVENT_ZOOM_PRESSED 50 |
||
91 | #define SONYPI_EVENT_THUMBPHRASE_PRESSED 51 |
||
92 | #define SONYPI_EVENT_MEYE_FACE 52 |
||
93 | #define SONYPI_EVENT_MEYE_OPPOSITE 53 |
||
94 | #define SONYPI_EVENT_MEMORYSTICK_INSERT 54 |
||
95 | #define SONYPI_EVENT_MEMORYSTICK_EJECT 55 |
||
96 | #define SONYPI_EVENT_ANYBUTTON_RELEASED 56 |
||
97 | #define SONYPI_EVENT_BATTERY_INSERT 57 |
||
98 | #define SONYPI_EVENT_BATTERY_REMOVE 58 |
||
99 | |||
100 | /* get/set brightness */ |
||
101 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) |
||
102 | #define SONYPI_IOCSBRT _IOW('v', 0, __u8) |
||
103 | |||
104 | /* get battery full capacity/remaining capacity */ |
||
105 | #define SONYPI_IOCGBAT1CAP _IOR('v', 2, __u16) |
||
106 | #define SONYPI_IOCGBAT1REM _IOR('v', 3, __u16) |
||
107 | #define SONYPI_IOCGBAT2CAP _IOR('v', 4, __u16) |
||
108 | #define SONYPI_IOCGBAT2REM _IOR('v', 5, __u16) |
||
109 | |||
110 | /* get battery flags: battery1/battery2/ac adapter present */ |
||
111 | #define SONYPI_BFLAGS_B1 0x01 |
||
112 | #define SONYPI_BFLAGS_B2 0x02 |
||
113 | #define SONYPI_BFLAGS_AC 0x04 |
||
114 | #define SONYPI_IOCGBATFLAGS _IOR('v', 7, __u8) |
||
115 | |||
116 | /* get/set bluetooth subsystem state on/off */ |
||
117 | #define SONYPI_IOCGBLUE _IOR('v', 8, __u8) |
||
118 | #define SONYPI_IOCSBLUE _IOW('v', 9, __u8) |
||
119 | |||
120 | #ifdef __KERNEL__ |
||
121 | |||
122 | /* used only for communication between v4l and sonypi */ |
||
123 | |||
124 | #define SONYPI_COMMAND_GETCAMERA 1 |
||
125 | #define SONYPI_COMMAND_SETCAMERA 2 |
||
126 | #define SONYPI_COMMAND_GETCAMERABRIGHTNESS 3 |
||
127 | #define SONYPI_COMMAND_SETCAMERABRIGHTNESS 4 |
||
128 | #define SONYPI_COMMAND_GETCAMERACONTRAST 5 |
||
129 | #define SONYPI_COMMAND_SETCAMERACONTRAST 6 |
||
130 | #define SONYPI_COMMAND_GETCAMERAHUE 7 |
||
131 | #define SONYPI_COMMAND_SETCAMERAHUE 8 |
||
132 | #define SONYPI_COMMAND_GETCAMERACOLOR 9 |
||
133 | #define SONYPI_COMMAND_SETCAMERACOLOR 10 |
||
134 | #define SONYPI_COMMAND_GETCAMERASHARPNESS 11 |
||
135 | #define SONYPI_COMMAND_SETCAMERASHARPNESS 12 |
||
136 | #define SONYPI_COMMAND_GETCAMERAPICTURE 13 |
||
137 | #define SONYPI_COMMAND_SETCAMERAPICTURE 14 |
||
138 | #define SONYPI_COMMAND_GETCAMERAAGC 15 |
||
139 | #define SONYPI_COMMAND_SETCAMERAAGC 16 |
||
140 | #define SONYPI_COMMAND_GETCAMERADIRECTION 17 |
||
141 | #define SONYPI_COMMAND_GETCAMERAROMVERSION 18 |
||
142 | #define SONYPI_COMMAND_GETCAMERAREVISION 19 |
||
143 | |||
144 | u8 sonypi_camera_command(int command, u8 value); |
||
145 | |||
146 | #endif /* __KERNEL__ */ |
||
147 | |||
148 | #endif /* _SONYPI_H_ */ |