summaryrefslogtreecommitdiff
path: root/include/linux/joystick.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 13:28:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 13:28:32 -0700
commit0b381a286e5d748b1fd80095d3dd52326819742f (patch)
treed72fca56123520b9c78661137f8a02b6ad26f95b /include/linux/joystick.h
parent034b5eeb6bc783e7f60e11299154556e65699e7a (diff)
parent5921e6f8809b1616932ca4afd40fe449faa8fd88 (diff)
Merge tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers
Pull UAPI disintegration for include/linux/{,byteorder/}*.h from David Howells: "The patches contained herein do the following: (1) Remove kernel-only stuff in linux/ppp-comp.h from the UAPI. I checked this with Paul Mackerras before I created the patch and he suggested some extra bits to unexport. (2) Remove linux/blk_types.h entirely from the UAPI as none of it is userspace applicable, and remove from the UAPI that part of linux/fs.h that was the reason for linux/blk_types.h being exported in the first place. I discussed this with Jens Axboe before creating the patch. (3) The big patch of the series to disintegrate include/linux/*.h as a unit. This could be split up, though there would be collisions in moving stuff between the two Kbuild files when the parts are merged as that file is sorted alphabetically rather than being grouped by subsystem. Of this set of headers, 17 files have changed in the UAPI exported region since the 4th and only 8 since the 9th so there isn't much change in this area - as one might expect. It should be pretty obvious and straightforward if it does come to fixing up: stuff in __KERNEL__ guards stays where it is and stuff outside moves to the same file in the include/uapi/linux/ directory. If a new file appears then things get a bit more complicated as the "headers +=" line has to move to include/uapi/linux/Kbuild. Only one new file has appeared since the 9th and I judge this type of event relatively unlikely. (4) A patch to disintegrate include/linux/byteorder/*.h as a unit. Signed-off-by: David Howells <dhowells@redhat.com>" * tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers: UAPI: (Scripted) Disintegrate include/linux/byteorder UAPI: (Scripted) Disintegrate include/linux UAPI: Unexport linux/blk_types.h UAPI: Unexport part of linux/ppp-comp.h
Diffstat (limited to 'include/linux/joystick.h')
-rw-r--r--include/linux/joystick.h114
1 files changed, 3 insertions, 111 deletions
diff --git a/include/linux/joystick.h b/include/linux/joystick.h
index 47199b13e0eb..cbf2aa9e93b9 100644
--- a/include/linux/joystick.h
+++ b/include/linux/joystick.h
@@ -1,12 +1,8 @@
-#ifndef _LINUX_JOYSTICK_H
-#define _LINUX_JOYSTICK_H
-
/*
* Copyright (C) 1996-2000 Vojtech Pavlik
*
* Sponsored by SuSE
*/
-
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,113 +22,11 @@
* e-mail - mail your message to <vojtech@suse.cz>, or by paper mail:
* Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
*/
+#ifndef _LINUX_JOYSTICK_H
+#define _LINUX_JOYSTICK_H
-#include <linux/types.h>
-#include <linux/input.h>
-
-/*
- * Version
- */
-
-#define JS_VERSION 0x020100
-
-/*
- * Types and constants for reading from /dev/js
- */
-
-#define JS_EVENT_BUTTON 0x01 /* button pressed/released */
-#define JS_EVENT_AXIS 0x02 /* joystick moved */
-#define JS_EVENT_INIT 0x80 /* initial state of device */
-
-struct js_event {
- __u32 time; /* event timestamp in milliseconds */
- __s16 value; /* value */
- __u8 type; /* event type */
- __u8 number; /* axis/button number */
-};
-
-/*
- * IOCTL commands for joystick driver
- */
-
-#define JSIOCGVERSION _IOR('j', 0x01, __u32) /* get driver version */
-
-#define JSIOCGAXES _IOR('j', 0x11, __u8) /* get number of axes */
-#define JSIOCGBUTTONS _IOR('j', 0x12, __u8) /* get number of buttons */
-#define JSIOCGNAME(len) _IOC(_IOC_READ, 'j', 0x13, len) /* get identifier string */
-
-#define JSIOCSCORR _IOW('j', 0x21, struct js_corr) /* set correction values */
-#define JSIOCGCORR _IOR('j', 0x22, struct js_corr) /* get correction values */
-
-#define JSIOCSAXMAP _IOW('j', 0x31, __u8[ABS_CNT]) /* set axis mapping */
-#define JSIOCGAXMAP _IOR('j', 0x32, __u8[ABS_CNT]) /* get axis mapping */
-#define JSIOCSBTNMAP _IOW('j', 0x33, __u16[KEY_MAX - BTN_MISC + 1]) /* set button mapping */
-#define JSIOCGBTNMAP _IOR('j', 0x34, __u16[KEY_MAX - BTN_MISC + 1]) /* get button mapping */
-
-/*
- * Types and constants for get/set correction
- */
-
-#define JS_CORR_NONE 0x00 /* returns raw values */
-#define JS_CORR_BROKEN 0x01 /* broken line */
-
-struct js_corr {
- __s32 coef[8];
- __s16 prec;
- __u16 type;
-};
-
-/*
- * v0.x compatibility definitions
- */
-
-#define JS_RETURN sizeof(struct JS_DATA_TYPE)
-#define JS_TRUE 1
-#define JS_FALSE 0
-#define JS_X_0 0x01
-#define JS_Y_0 0x02
-#define JS_X_1 0x04
-#define JS_Y_1 0x08
-#define JS_MAX 2
-
-#define JS_DEF_TIMEOUT 0x1300
-#define JS_DEF_CORR 0
-#define JS_DEF_TIMELIMIT 10L
-
-#define JS_SET_CAL 1
-#define JS_GET_CAL 2
-#define JS_SET_TIMEOUT 3
-#define JS_GET_TIMEOUT 4
-#define JS_SET_TIMELIMIT 5
-#define JS_GET_TIMELIMIT 6
-#define JS_GET_ALL 7
-#define JS_SET_ALL 8
-
-struct JS_DATA_TYPE {
- __s32 buttons;
- __s32 x;
- __s32 y;
-};
-
-struct JS_DATA_SAVE_TYPE_32 {
- __s32 JS_TIMEOUT;
- __s32 BUSY;
- __s32 JS_EXPIRETIME;
- __s32 JS_TIMELIMIT;
- struct JS_DATA_TYPE JS_SAVE;
- struct JS_DATA_TYPE JS_CORR;
-};
-
-struct JS_DATA_SAVE_TYPE_64 {
- __s32 JS_TIMEOUT;
- __s32 BUSY;
- __s64 JS_EXPIRETIME;
- __s64 JS_TIMELIMIT;
- struct JS_DATA_TYPE JS_SAVE;
- struct JS_DATA_TYPE JS_CORR;
-};
+#include <uapi/linux/joystick.h>
-#ifdef __KERNEL__
#if BITS_PER_LONG == 64
#define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_64
#elif BITS_PER_LONG == 32
@@ -140,6 +34,4 @@ struct JS_DATA_SAVE_TYPE_64 {
#else
#error Unexpected BITS_PER_LONG
#endif
-#endif
-
#endif /* _LINUX_JOYSTICK_H */