blob: c0f87da78f8a44b788fd32ebcabf94d4b72e2962 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Sony Programmable I/O Control Device driver for VAIO
3 *
4 * Copyright (C) 2001-2005 Stelian Pop <stelian@popies.net>
5 *
6 * Copyright (C) 2005 Narayanan R S <nars@kadamba.org>
7
John Anthony Kazos Jr121e70b2007-05-09 08:30:57 +02008 * Copyright (C) 2001-2002 AlcĂ´ve <www.alcove.com>
Linus Torvalds1da177e2005-04-16 15:20:36 -07009 *
10 * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au>
11 *
12 * Copyright (C) 2001 Junichi Morita <jun1m@mars.dti.ne.jp>
13 *
14 * Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp>
15 *
16 * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com>
17 *
18 * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras.
19 *
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2 of the License, or
23 * (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
29 *
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 *
34 */
35
36#ifndef _SONYPI_H_
37#define _SONYPI_H_
38
39#include <linux/types.h>
40
41/* events the user application reading /dev/sonypi can use */
42
Mattia Dongili4eeb5022011-02-19 11:52:27 +090043#define SONYPI_EVENT_IGNORE 0
Linus Torvalds1da177e2005-04-16 15:20:36 -070044#define SONYPI_EVENT_JOGDIAL_DOWN 1
45#define SONYPI_EVENT_JOGDIAL_UP 2
46#define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3
47#define SONYPI_EVENT_JOGDIAL_UP_PRESSED 4
48#define SONYPI_EVENT_JOGDIAL_PRESSED 5
49#define SONYPI_EVENT_JOGDIAL_RELEASED 6 /* obsolete */
50#define SONYPI_EVENT_CAPTURE_PRESSED 7
51#define SONYPI_EVENT_CAPTURE_RELEASED 8 /* obsolete */
52#define SONYPI_EVENT_CAPTURE_PARTIALPRESSED 9
53#define SONYPI_EVENT_CAPTURE_PARTIALRELEASED 10
54#define SONYPI_EVENT_FNKEY_ESC 11
55#define SONYPI_EVENT_FNKEY_F1 12
56#define SONYPI_EVENT_FNKEY_F2 13
57#define SONYPI_EVENT_FNKEY_F3 14
58#define SONYPI_EVENT_FNKEY_F4 15
59#define SONYPI_EVENT_FNKEY_F5 16
60#define SONYPI_EVENT_FNKEY_F6 17
61#define SONYPI_EVENT_FNKEY_F7 18
62#define SONYPI_EVENT_FNKEY_F8 19
63#define SONYPI_EVENT_FNKEY_F9 20
64#define SONYPI_EVENT_FNKEY_F10 21
65#define SONYPI_EVENT_FNKEY_F11 22
66#define SONYPI_EVENT_FNKEY_F12 23
67#define SONYPI_EVENT_FNKEY_1 24
68#define SONYPI_EVENT_FNKEY_2 25
69#define SONYPI_EVENT_FNKEY_D 26
70#define SONYPI_EVENT_FNKEY_E 27
71#define SONYPI_EVENT_FNKEY_F 28
72#define SONYPI_EVENT_FNKEY_S 29
73#define SONYPI_EVENT_FNKEY_B 30
74#define SONYPI_EVENT_BLUETOOTH_PRESSED 31
75#define SONYPI_EVENT_PKEY_P1 32
76#define SONYPI_EVENT_PKEY_P2 33
77#define SONYPI_EVENT_PKEY_P3 34
78#define SONYPI_EVENT_BACK_PRESSED 35
79#define SONYPI_EVENT_LID_CLOSED 36
80#define SONYPI_EVENT_LID_OPENED 37
81#define SONYPI_EVENT_BLUETOOTH_ON 38
82#define SONYPI_EVENT_BLUETOOTH_OFF 39
83#define SONYPI_EVENT_HELP_PRESSED 40
84#define SONYPI_EVENT_FNKEY_ONLY 41
85#define SONYPI_EVENT_JOGDIAL_FAST_DOWN 42
86#define SONYPI_EVENT_JOGDIAL_FAST_UP 43
87#define SONYPI_EVENT_JOGDIAL_FAST_DOWN_PRESSED 44
88#define SONYPI_EVENT_JOGDIAL_FAST_UP_PRESSED 45
89#define SONYPI_EVENT_JOGDIAL_VFAST_DOWN 46
90#define SONYPI_EVENT_JOGDIAL_VFAST_UP 47
91#define SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED 48
92#define SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED 49
93#define SONYPI_EVENT_ZOOM_PRESSED 50
94#define SONYPI_EVENT_THUMBPHRASE_PRESSED 51
95#define SONYPI_EVENT_MEYE_FACE 52
96#define SONYPI_EVENT_MEYE_OPPOSITE 53
97#define SONYPI_EVENT_MEMORYSTICK_INSERT 54
98#define SONYPI_EVENT_MEMORYSTICK_EJECT 55
99#define SONYPI_EVENT_ANYBUTTON_RELEASED 56
100#define SONYPI_EVENT_BATTERY_INSERT 57
101#define SONYPI_EVENT_BATTERY_REMOVE 58
102#define SONYPI_EVENT_FNKEY_RELEASED 59
Erik Walingd2052c12005-09-06 15:17:02 -0700103#define SONYPI_EVENT_WIRELESS_ON 60
104#define SONYPI_EVENT_WIRELESS_OFF 61
Mattia Dongili3eb87492008-01-14 18:05:45 +0900105#define SONYPI_EVENT_ZOOM_IN_PRESSED 62
106#define SONYPI_EVENT_ZOOM_OUT_PRESSED 63
Matthew Garrett9b578962009-03-26 21:58:14 +0900107#define SONYPI_EVENT_CD_EJECT_PRESSED 64
Matthew Garrett45c79422009-03-26 21:58:16 +0900108#define SONYPI_EVENT_MODEKEY_PRESSED 65
109#define SONYPI_EVENT_PKEY_P4 66
110#define SONYPI_EVENT_PKEY_P5 67
111#define SONYPI_EVENT_SETTINGKEY_PRESSED 68
Harald Jenny1cae7102009-03-26 21:58:18 +0900112#define SONYPI_EVENT_VOLUME_INC_PRESSED 69
113#define SONYPI_EVENT_VOLUME_DEC_PRESSED 70
114#define SONYPI_EVENT_BRIGHTNESS_PRESSED 71
Mattia Dongili4f924ba2009-12-17 00:08:33 +0900115#define SONYPI_EVENT_MEDIA_PRESSED 72
Mattia Dongili1a7d9462011-01-08 18:47:29 +0900116#define SONYPI_EVENT_VENDOR_PRESSED 73
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117
118/* get/set brightness */
119#define SONYPI_IOCGBRT _IOR('v', 0, __u8)
120#define SONYPI_IOCSBRT _IOW('v', 0, __u8)
121
122/* get battery full capacity/remaining capacity */
123#define SONYPI_IOCGBAT1CAP _IOR('v', 2, __u16)
124#define SONYPI_IOCGBAT1REM _IOR('v', 3, __u16)
125#define SONYPI_IOCGBAT2CAP _IOR('v', 4, __u16)
126#define SONYPI_IOCGBAT2REM _IOR('v', 5, __u16)
127
128/* get battery flags: battery1/battery2/ac adapter present */
129#define SONYPI_BFLAGS_B1 0x01
130#define SONYPI_BFLAGS_B2 0x02
131#define SONYPI_BFLAGS_AC 0x04
132#define SONYPI_IOCGBATFLAGS _IOR('v', 7, __u8)
133
134/* get/set bluetooth subsystem state on/off */
135#define SONYPI_IOCGBLUE _IOR('v', 8, __u8)
136#define SONYPI_IOCSBLUE _IOW('v', 9, __u8)
137
138/* get/set fan state on/off */
139#define SONYPI_IOCGFAN _IOR('v', 10, __u8)
140#define SONYPI_IOCSFAN _IOW('v', 11, __u8)
141
142/* get temperature (C) */
143#define SONYPI_IOCGTEMP _IOR('v', 12, __u8)
144
145#ifdef __KERNEL__
146
147/* used only for communication between v4l and sonypi */
148
149#define SONYPI_COMMAND_GETCAMERA 1 /* obsolete */
150#define SONYPI_COMMAND_SETCAMERA 2
151#define SONYPI_COMMAND_GETCAMERABRIGHTNESS 3 /* obsolete */
152#define SONYPI_COMMAND_SETCAMERABRIGHTNESS 4
153#define SONYPI_COMMAND_GETCAMERACONTRAST 5 /* obsolete */
154#define SONYPI_COMMAND_SETCAMERACONTRAST 6
155#define SONYPI_COMMAND_GETCAMERAHUE 7 /* obsolete */
156#define SONYPI_COMMAND_SETCAMERAHUE 8
157#define SONYPI_COMMAND_GETCAMERACOLOR 9 /* obsolete */
158#define SONYPI_COMMAND_SETCAMERACOLOR 10
159#define SONYPI_COMMAND_GETCAMERASHARPNESS 11 /* obsolete */
160#define SONYPI_COMMAND_SETCAMERASHARPNESS 12
161#define SONYPI_COMMAND_GETCAMERAPICTURE 13 /* obsolete */
162#define SONYPI_COMMAND_SETCAMERAPICTURE 14
163#define SONYPI_COMMAND_GETCAMERAAGC 15 /* obsolete */
164#define SONYPI_COMMAND_SETCAMERAAGC 16
165#define SONYPI_COMMAND_GETCAMERADIRECTION 17 /* obsolete */
166#define SONYPI_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */
167#define SONYPI_COMMAND_GETCAMERAREVISION 19 /* obsolete */
168
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169#endif /* __KERNEL__ */
170
171#endif /* _SONYPI_H_ */