2 * include/asm-arm/arch-s3c24a0/s3c24a0-ioctl.h
6 * $Id: s3c24a0-ioctl.h,v 1.2 2005/11/28 03:55:11 gerg Exp $
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
12 #include <linux/ioctl.h>
13 #include "s3c24a0-common.h"
15 #ifndef _INCLUDE_LINUETTE_IOCTL_H_
16 #define _INCLUDE_LINUETTE_IOCTL_H_
20 * see Documentation/ioctl-number.txt
22 #define IOC_MAGIC ('h')
28 unsigned short pressure
;
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
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)
59 0~ : valid (usually, values from ADC or 0 ~ 100%)
61 _ Remaining battery life
71 0x02 : Critical (sleep definitely)
74 0x10 : backup battery is low, change it
75 0x40 : backup battery is present
76 0x80 : system battery is present
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. */
98 int level
, voltage
, raw
;
100 unsigned char battery
;
102 #define GET_BATTERY_STATUS _IOR(IOC_MAGIC, 0x85, BATTERY_RET)
103 #define SET_BATTERY_TIMER _IOR(IOC_MAGIC, 0x8f, unsigned int)
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)
117 unsigned long type
, id
;
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)
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)
130 #define RESUME _IO (IOC_MAGIC, 0x8a)
133 * for /dev/misc/apm_bios
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
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 */
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_ */