MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-arm / arch-s3c24a0 / s3c24a0-ioctl.h
blob39fed187dbb23abe3dde706a68ed1369cad8f832
1 /*
2 * include/asm-arm/arch-s3c24a0/s3c24a0-ioctl.h
3 *
4 * ioctl's defintion.
6 * $Id: s3c24a0-ioctl.h,v 1.2 2005/11/28 03:55:11 gerg Exp $
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file COPYING in the main directory of this archive
10 * for more details.
12 #include <linux/ioctl.h>
13 #include "s3c24a0-common.h"
15 #ifndef _INCLUDE_LINUETTE_IOCTL_H_
16 #define _INCLUDE_LINUETTE_IOCTL_H_
17 #ifndef __ASSEMBLY__
20 * see Documentation/ioctl-number.txt
22 #define IOC_MAGIC ('h')
25 * for touch devices
27 typedef struct {
28 unsigned short pressure;
29 unsigned short x;
30 unsigned short y;
31 unsigned short pad;
32 } TS_RET;
34 typedef struct {
35 int xscale;
36 int xtrans;
37 int yscale;
38 int ytrans;
39 int xyswap;
40 } TS_CAL;
42 #define TS_GET_CAL _IOR(IOC_MAGIC, 0x81, TS_CAL)
43 #define TS_SET_CAL _IOW(IOC_MAGIC, 0x82, TS_CAL)
44 #define TS_ENABLE _IO (IOC_MAGIC, 0x90)
45 #define TS_DISABLE _IO (IOC_MAGIC, 0x91)
48 * below ioctl function is for hacker and iom
51 * brightness control
53 #define GET_BRIGHTNESS _IOR(IOC_MAGIC, 0x83, unsigned int)
54 #define SET_BRIGHTNESS _IOW(IOC_MAGIC, 0x84, unsigned int)
55 #define GET_BRIGHTNESS_INFO _IOR(IOC_MAGIC, 0x8e, unsigned int)
58 . BATTERY_RET.level
59 0~ : valid (usually, values from ADC or 0 ~ 100%)
60 -1 : Unknown
61 _ Remaining battery life
63 . BATTERY_RET.ac
64 0x00 : Off-line
65 0x01 : On-line
66 0xff : Unknown
67 _ AC line status
69 . BATTERY_RET.battery
70 0x01 : Full (== 100%)
71 0x02 : Critical (sleep definitely)
72 0x03 : Charging
73 0x04 : Low (warning)
74 0x10 : backup battery is low, change it
75 0x40 : backup battery is present
76 0x80 : system battery is present
77 0xff : Unknown
78 _ Battery status
81 #define AC_OFF_LINE 0x00
82 #define AC_ON_LINE 0x01
83 #define AC_UNKNOWN 0xff
85 #define BATTERY_FULL 0x01
86 #define BATTERY_CRIT 0x02
87 #define BATTERY_CHARGE 0x03
88 #define BATTERY_LOW 0x04
89 #define battery_stat(x) ((x) & 0xf)
90 #define BATTERY_BAK_LOW 0x10
91 #define BATTERY_BAK 0x40
92 #define BATTERY_SYS 0x80
93 #define BATTERY_UNKNOWN 0xff
95 #define BATTERY_TIMER_STOP 0 /* unit: sec. */
97 typedef struct {
98 int level, voltage, raw;
99 unsigned char ac;
100 unsigned char battery;
101 } BATTERY_RET;
102 #define GET_BATTERY_STATUS _IOR(IOC_MAGIC, 0x85, BATTERY_RET)
103 #define SET_BATTERY_TIMER _IOR(IOC_MAGIC, 0x8f, unsigned int)
106 * for apm_bios
108 #define PM_STATE_QUERY 0x20
109 #define PM_STATE_D0 0
110 #define PM_STATE_D1 1
111 #define PM_STATE_D2 2
112 #define PM_STATE_D3 3
113 #define PM_STATE_UNKNOWN (-1)
115 struct pm_usr_dev {
116 unsigned long dev;
117 unsigned long type, id;
118 int state;
120 #define PM_DEV _IOW(IOC_MAGIC, 0x86, struct pm_usr_dev)
122 /* if some devices gives veto, do not sleep */
123 #define USR_SUSPEND _IO (IOC_MAGIC, 0x87)
124 /* sleep simply */
125 #define SYS_SUSPEND _IO (IOC_MAGIC, 0x88)
126 /* LCD/INPUT/removable sleep
127 or if not, sleep as soon as possible */
128 #define STANDBY _IO (IOC_MAGIC, 0x89)
129 /* wakeup devices */
130 #define RESUME _IO (IOC_MAGIC, 0x8a)
133 * for /dev/misc/apm_bios
135 #define LED_ON 0x01
136 #define LED_OFF 0x00
137 #define LED_BLINK 0x04
138 #define LED_BLINK_RATE 0x08 /* variable-rate blink */
139 #define LED_READ_ONLY 0x80
140 #define LED_COLOR 0x40
142 typedef struct {
143 unsigned int index; /* LED index to control */
144 unsigned int stat; /* control command or current status */
145 unsigned int rate; /* blinking rate */
146 unsigned int color; /* LED color */
147 unsigned int info; /* capable function */
148 } LED_RET;
150 #define GET_LED_NO _IOR(IOC_MAGIC, 0x8b, unsigned int)
151 #define GET_LED_STATUS _IOR(IOC_MAGIC, 0x8c, LED_RET)
152 #define SET_LED_STATUS _IOW(IOC_MAGIC, 0x8d, LED_RET)
154 #include "s3c24a0-machine.h"
155 #endif /* __ASSEMBLY__ */
156 #endif /* _INCLUDE_LINUETTE_IOCTL_H_ */