linuette_ioctl.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:6k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  * include/asm-arm/arch-sa1100/ming_ioctl.h
  3.  *
  4.  * ioctl's defintion.
  5.  *
  6.  * Author: Yong-iL Joh <tolkien@mizi.com>
  7.  * Date  : $Date: 2002/08/05 04:17:37 $ 
  8.  *
  9.  * $Revision: 1.5 $
  10.  *
  11.    Wed Jun 13 2001 Yong-iL Joh <tolkien@mizi.com>
  12.    - initial
  13.    Mon Dec 17 2001 Lee, SooJin <soojin@mizi.com>
  14.    - add radio's ioctl
  15.    Wed Jan  9 2002 Lee, SooJin <soojin@mizi.com>
  16.    - dimming control 何盒 ioctl function俊 措茄 沥狼 函版
  17.    - 102 API 烹老阑 困茄 累诀 眠啊
  18.    - charging led 何盒 眠啊
  19.    Sat Jan 12 2002 Yong-iL Joh <tolkien@mizi.com>
  20.    - kernel vs app. API spec (0.3 draft) 馆康
  21.    - hnt-common.h栏肺 老何 捞傈
  22.    - rename as linuette_ioctl.h
  23.    Tue May  7 2002 Yong-iL Joh <tolkien@mizi.com>
  24.    - kernel vs app. API spec (draft) v1.31
  25.    Fri May 10 2002 Yong-iL Joh <tolkien@mizi.com>
  26.    - kernel vs app. API spec (draft) v1.33
  27.  *
  28.  * This file is subject to the terms and conditions of the GNU General Public
  29.  * License.  See the file COPYING in the main directory of this archive
  30.  * for more details.
  31.  */
  32. #include <linux/ioctl.h>
  33. #include "linuette_common.h"
  34. #ifndef _INCLUDE_LINUETTE_IOCTL_H_
  35. #define _INCLUDE_LINUETTE_IOCTL_H_
  36. #ifndef __ASSEMBLY__
  37. /* ioctls
  38.  * 'F' is video subsystem's ioctl prefix
  39.  * see Documentation/ioctl-number.txt
  40.  */
  41. #define BACKLIGHT 0x1
  42. #define FRONTLIGHT 0x0
  43. typedef struct {
  44.   unsigned char mode; /* backlight = 1, frontlight = 0 */
  45.   unsigned char level;
  46. } BRIGHTNESS_DEV;
  47. #define GET_BRIGHTNESS _IOR('F', 0x40, unsigned int)
  48. #define SET_BRIGHTNESS _IOW('F', 0x41, unsigned int)
  49. #define PROBE_BRIGHTNESS _IOR('F', 0x42, BRIGHTNESS_DEV)
  50. typedef struct {
  51.   unsigned short pressure;
  52.   unsigned short x;
  53.   unsigned short y;
  54.   unsigned short pad;
  55. } TS_RET;
  56. typedef struct {
  57.   int xscale;
  58.   int xtrans;
  59.   int yscale;
  60.   int ytrans;
  61.   int xyswap;
  62. } TS_CAL;
  63. /*
  64.     . BATTERY_RET.remain.sec
  65.           1~   : valid
  66.           0    : Unknown
  67.       _ Remaining battery life (time units)
  68.     . BATTERY_RET.level
  69.           0~   : valid (value from ADC)
  70.           -1   : Unknown
  71.       _ Remaining battery life
  72.       _ battery 规傈邦急 漂己阑 馆康窍扁 困秦辑
  73.         俺惯 3角篮 俺惯 2角俊
  74.            X = {x : x in N, x is value from ADC}
  75.            Y = {x : x is integer, 0 <= x <= 99}
  76.            f: X -> Y
  77.         牢 9瞒 急屈规沥侥狼 拌荐甫 力傍窃.
  78.     . BATTERY_RET.ac
  79.           0x00 : Off-line
  80.           0x01 : On-line
  81.           0x02 : On backup power (BIOS >= 1.1 only)
  82.           0xff : Unknown
  83.       _ AC line status
  84.     . BATTERY_RET.battery
  85.           0x10 : Full (== 100%)
  86.           0x00 : High (> 80%)
  87.           0x01 : Low (< 40%)
  88.           0x02 : Critical (== BATTERY_IS_LOW event)
  89.           0x03 : Charging
  90.           0x04 : Selected battery not present (BIOS >= 1.2 only)
  91.           0x80 : No system battery
  92.           0xff : Unknown
  93.       _ Battery status
  94. */
  95. #define AC_OFF_LINE 0x00
  96. #define AC_ON_LINE 0x01
  97. #define AC_BACKUP 0x02
  98. #define AC_UNKNOWN 0xff
  99. #define BATTERY_FULL 0x10
  100. #define BATTERY_HIGH 0x00
  101. #define BATTERY_LOW 0x01
  102. #define BATTERY_CRIT 0x02
  103. #define BATTERY_CHARGE 0x03
  104. #define BATTERY_NONE 0x04
  105. #define BATTERY_NOSYS 0x80
  106. #define BATTERY_UNKNOWN 0xff
  107. #define BATTERY_NORMAL 0x00
  108. typedef struct {
  109.   unsigned long sec;
  110.   int level;
  111.   unsigned char ac;
  112.   unsigned char battery;
  113. } BATTERY_RET;
  114. /*
  115.  * 'A' is for linux/apm_bios.h
  116.  * see Documentation/ioctl-number.txt
  117.  */
  118. #define GET_BATTERY_STATUS _IOR('A', 0x10, BATTERY_RET)
  119. #define GET_JIFFIES _IOR('A', 0x11, unsigned long)
  120. #define GET_LCD_STATUS _IOR('A', 0x13, unsigned int)
  121. #define SET_INPUT_DEV _IOW('A', 0x14, unsigned int)
  122. #define GET_MZ_EVENT _IOR('A', 0x25, unsigned long)
  123. #define APM_LCD_OFF _IO ('A', 0x50) /* 0x50 == 80 */
  124. #define APM_LCD_ON _IO ('A', 0x51)
  125. #define APM_DEV_LIST _IO ('A', 0x52) /* for debugging */
  126. #define APM_DEV_ONOFF _IOW('A', 0x53, struct pm_dev) 
  127. #define APM_MZ_SLEEP _IO ('A', 0x54) 
  128. #define LCD_ON 0x01
  129. #define LCD_OFF 0x00
  130. #define INPUT_DEV_ON 0x01
  131. #define INPUT_DEV_OFF 0x00
  132. /* event */
  133. #define BATTERY_IS_LOW 0x00000001
  134. #define BATTERY_IS_FULL 0x00000002
  135. #define ACLINE_ON 0x00000004
  136. #define ACLINE_OFF 0x00000003
  137. #define EVENT_UNKNOWN 0x00000010
  138. #define PHONE_CALLED 0x00000020
  139. #define DATA_RECEIVED 0x00000040
  140. #define SYSTEM_NOMEM 0x00000060
  141. #define SYSTEM_WAKEUP 0x00000070
  142. #define SYSTEM_SLEEP 0x00000080
  143. #define JFFS2_PANIC 0x00000090 /* JFFS2 panic(severely broken) */
  144. #define CRADLE_INSERT 0x00000100 /* put/remove cradle */
  145. #define CRADLE_REMOVE 0x00000200
  146. #define USB_SL_INSERT 0x00000300 /* USB slave port insert/remove */
  147. #define USB_SL_REMOVE 0x00000400
  148. #define USB_MA_INSERT 0x00000500 /* some USB device de/attached */
  149. #define USB_MA_REMOVE 0x00000600
  150. #define UART_INSERT 0x00000700 /* UART port insert/remove */
  151. #define UART_REMOVE 0x00000800
  152. #define PCMCIA_INSERT 0x00001000 /* some PCMCIA device de/attached */
  153. #define PCMCIA_REMOVE 0x00002000
  154. #define CF_INSERT PCMCIA_INSERT /* some CF device de/attached */
  155. #define CF_REMOVE PCMCIA_REMOVE
  156. #define EXT_DEV_INSERT 0x00003000 /* some removable device de/attached */
  157. #define EXT_DEV_REMOVE 0x00004000
  158. /*
  159.  * for /dev/misc/led
  160.  * 'h' is Charon filesystem <zapman@interlan.net>
  161.  * see Documentation/ioctl-number.txt
  162.  */
  163. typedef struct {
  164.   unsigned int index; /* LED index to control */
  165.   unsigned int stat; /* control command or current status */
  166.   unsigned int rate; /* blinking rate */
  167.   unsigned int info; /* capable function */
  168. } LED_RET;
  169. #define GET_LED_NO _IOR('h', 0x80, unsigned int)
  170. #define GET_LED_STATUS _IOR('h', 0x82, LED_RET)
  171. #define SET_LED_STATUS _IOW('h', 0x83, LED_RET)
  172. #define MZ_LED_ON 0x01
  173. #define MZ_LED_OFF 0x00
  174. #define MZ_LED_BLINK 0x04
  175. #define MZ_LED_BLINK_RATE 0x08
  176. #define MZ_LED_READ_ONLY 0x80
  177. /* ioctls for FB - extended 
  178.  * see include/linux/fb.h
  179.  */
  180. typedef struct {
  181. int s_xoffset;
  182. int s_yoffset;
  183. int d_xoffset;
  184. int d_yoffset;
  185. int height;
  186. int width;
  187. } HWBLT, *PHWBLT;
  188. #define FBBITBLT _IOW('F', 0xf0, HWBLT)  /* hardware bitblt */
  189. #include "linuette_machine.h"
  190. #endif /* __ASSEMBLY__ */
  191. #endif /* _INCLUDE_LINUETTE_IOCTL_H_ */
  192. /*
  193.  | $Id: linuette_ioctl.h,v 1.5 2002/08/05 04:17:37 tolkien Exp $
  194.  |
  195.  | Local Variables:
  196.  | mode: c
  197.  | mode: font-lock
  198.  | version-control: t
  199.  | delete-old-versions: t
  200.  | End:
  201.  |
  202.  | -*- End-Of-File -*-
  203.  */