sonypi.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /*
  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. * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
  8. *
  9. * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au>
  10. *
  11. * Copyright (C) 2001 Junichi Morita <jun1m@mars.dti.ne.jp>
  12. *
  13. * Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp>
  14. *
  15. * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com>
  16. *
  17. * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras.
  18. *
  19. * This program is free software; you can redistribute it and/or modify
  20. * it under the terms of the GNU General Public License as published by
  21. * the Free Software Foundation; either version 2 of the License, or
  22. * (at your option) any later version.
  23. *
  24. * This program is distributed in the hope that it will be useful,
  25. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  27. * GNU General Public License for more details.
  28. *
  29. * You should have received a copy of the GNU General Public License
  30. * along with this program; if not, write to the Free Software
  31. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  32. *
  33. */
  34. #ifndef _UAPI_SONYPI_H_
  35. #define _UAPI_SONYPI_H_
  36. #include <linux/types.h>
  37. /* events the user application reading /dev/sonypi can use */
  38. #define SONYPI_EVENT_IGNORE 0
  39. #define SONYPI_EVENT_JOGDIAL_DOWN 1
  40. #define SONYPI_EVENT_JOGDIAL_UP 2
  41. #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3
  42. #define SONYPI_EVENT_JOGDIAL_UP_PRESSED 4
  43. #define SONYPI_EVENT_JOGDIAL_PRESSED 5
  44. #define SONYPI_EVENT_JOGDIAL_RELEASED 6 /* obsolete */
  45. #define SONYPI_EVENT_CAPTURE_PRESSED 7
  46. #define SONYPI_EVENT_CAPTURE_RELEASED 8 /* obsolete */
  47. #define SONYPI_EVENT_CAPTURE_PARTIALPRESSED 9
  48. #define SONYPI_EVENT_CAPTURE_PARTIALRELEASED 10
  49. #define SONYPI_EVENT_FNKEY_ESC 11
  50. #define SONYPI_EVENT_FNKEY_F1 12
  51. #define SONYPI_EVENT_FNKEY_F2 13
  52. #define SONYPI_EVENT_FNKEY_F3 14
  53. #define SONYPI_EVENT_FNKEY_F4 15
  54. #define SONYPI_EVENT_FNKEY_F5 16
  55. #define SONYPI_EVENT_FNKEY_F6 17
  56. #define SONYPI_EVENT_FNKEY_F7 18
  57. #define SONYPI_EVENT_FNKEY_F8 19
  58. #define SONYPI_EVENT_FNKEY_F9 20
  59. #define SONYPI_EVENT_FNKEY_F10 21
  60. #define SONYPI_EVENT_FNKEY_F11 22
  61. #define SONYPI_EVENT_FNKEY_F12 23
  62. #define SONYPI_EVENT_FNKEY_1 24
  63. #define SONYPI_EVENT_FNKEY_2 25
  64. #define SONYPI_EVENT_FNKEY_D 26
  65. #define SONYPI_EVENT_FNKEY_E 27
  66. #define SONYPI_EVENT_FNKEY_F 28
  67. #define SONYPI_EVENT_FNKEY_S 29
  68. #define SONYPI_EVENT_FNKEY_B 30
  69. #define SONYPI_EVENT_BLUETOOTH_PRESSED 31
  70. #define SONYPI_EVENT_PKEY_P1 32
  71. #define SONYPI_EVENT_PKEY_P2 33
  72. #define SONYPI_EVENT_PKEY_P3 34
  73. #define SONYPI_EVENT_BACK_PRESSED 35
  74. #define SONYPI_EVENT_LID_CLOSED 36
  75. #define SONYPI_EVENT_LID_OPENED 37
  76. #define SONYPI_EVENT_BLUETOOTH_ON 38
  77. #define SONYPI_EVENT_BLUETOOTH_OFF 39
  78. #define SONYPI_EVENT_HELP_PRESSED 40
  79. #define SONYPI_EVENT_FNKEY_ONLY 41
  80. #define SONYPI_EVENT_JOGDIAL_FAST_DOWN 42
  81. #define SONYPI_EVENT_JOGDIAL_FAST_UP 43
  82. #define SONYPI_EVENT_JOGDIAL_FAST_DOWN_PRESSED 44
  83. #define SONYPI_EVENT_JOGDIAL_FAST_UP_PRESSED 45
  84. #define SONYPI_EVENT_JOGDIAL_VFAST_DOWN 46
  85. #define SONYPI_EVENT_JOGDIAL_VFAST_UP 47
  86. #define SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED 48
  87. #define SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED 49
  88. #define SONYPI_EVENT_ZOOM_PRESSED 50
  89. #define SONYPI_EVENT_THUMBPHRASE_PRESSED 51
  90. #define SONYPI_EVENT_MEYE_FACE 52
  91. #define SONYPI_EVENT_MEYE_OPPOSITE 53
  92. #define SONYPI_EVENT_MEMORYSTICK_INSERT 54
  93. #define SONYPI_EVENT_MEMORYSTICK_EJECT 55
  94. #define SONYPI_EVENT_ANYBUTTON_RELEASED 56
  95. #define SONYPI_EVENT_BATTERY_INSERT 57
  96. #define SONYPI_EVENT_BATTERY_REMOVE 58
  97. #define SONYPI_EVENT_FNKEY_RELEASED 59
  98. #define SONYPI_EVENT_WIRELESS_ON 60
  99. #define SONYPI_EVENT_WIRELESS_OFF 61
  100. #define SONYPI_EVENT_ZOOM_IN_PRESSED 62
  101. #define SONYPI_EVENT_ZOOM_OUT_PRESSED 63
  102. #define SONYPI_EVENT_CD_EJECT_PRESSED 64
  103. #define SONYPI_EVENT_MODEKEY_PRESSED 65
  104. #define SONYPI_EVENT_PKEY_P4 66
  105. #define SONYPI_EVENT_PKEY_P5 67
  106. #define SONYPI_EVENT_SETTINGKEY_PRESSED 68
  107. #define SONYPI_EVENT_VOLUME_INC_PRESSED 69
  108. #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70
  109. #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71
  110. #define SONYPI_EVENT_MEDIA_PRESSED 72
  111. #define SONYPI_EVENT_VENDOR_PRESSED 73
  112. /* get/set brightness */
  113. #define SONYPI_IOCGBRT _IOR('v', 0, __u8)
  114. #define SONYPI_IOCSBRT _IOW('v', 0, __u8)
  115. /* get battery full capacity/remaining capacity */
  116. #define SONYPI_IOCGBAT1CAP _IOR('v', 2, __u16)
  117. #define SONYPI_IOCGBAT1REM _IOR('v', 3, __u16)
  118. #define SONYPI_IOCGBAT2CAP _IOR('v', 4, __u16)
  119. #define SONYPI_IOCGBAT2REM _IOR('v', 5, __u16)
  120. /* get battery flags: battery1/battery2/ac adapter present */
  121. #define SONYPI_BFLAGS_B1 0x01
  122. #define SONYPI_BFLAGS_B2 0x02
  123. #define SONYPI_BFLAGS_AC 0x04
  124. #define SONYPI_IOCGBATFLAGS _IOR('v', 7, __u8)
  125. /* get/set bluetooth subsystem state on/off */
  126. #define SONYPI_IOCGBLUE _IOR('v', 8, __u8)
  127. #define SONYPI_IOCSBLUE _IOW('v', 9, __u8)
  128. /* get/set fan state on/off */
  129. #define SONYPI_IOCGFAN _IOR('v', 10, __u8)
  130. #define SONYPI_IOCSFAN _IOW('v', 11, __u8)
  131. /* get temperature (C) */
  132. #define SONYPI_IOCGTEMP _IOR('v', 12, __u8)
  133. #endif /* _UAPI_SONYPI_H_ */