Lines 12-17
Link Here
|
12 |
#ifdef __KERNEL__ |
12 |
#ifdef __KERNEL__ |
13 |
#include <linux/time.h> |
13 |
#include <linux/time.h> |
14 |
#include <linux/list.h> |
14 |
#include <linux/list.h> |
|
|
15 |
#include <linux/compat.h> |
15 |
#else |
16 |
#else |
16 |
#include <sys/time.h> |
17 |
#include <sys/time.h> |
17 |
#include <sys/ioctl.h> |
18 |
#include <sys/ioctl.h> |
Lines 75-81
struct input_absinfo {
Link Here
|
75 |
#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ |
76 |
#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ |
76 |
#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */ |
77 |
#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */ |
77 |
|
78 |
|
78 |
#define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ |
79 |
#define EVIOCSFF _IOW('E', 0x80, struct ff_effect) /* send a force effect to a force feedback device */ |
|
|
80 |
#ifdef CONFIG_COMPAT |
81 |
#define EVIOCSFF32 _IOW('E', 0x80, struct ff_effect32) /* send a force effect to a force feedback device */ |
82 |
#endif |
79 |
#define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ |
83 |
#define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ |
80 |
#define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ |
84 |
#define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ |
81 |
|
85 |
|
Lines 846-851
struct ff_periodic_effect {
Link Here
|
846 |
__s16 *custom_data; |
850 |
__s16 *custom_data; |
847 |
}; |
851 |
}; |
848 |
|
852 |
|
|
|
853 |
#ifdef CONFIG_COMPAT |
854 |
struct ff_periodic_effect32 { |
855 |
__u16 waveform; |
856 |
__u16 period; |
857 |
__s16 magnitude; |
858 |
__s16 offset; |
859 |
__u16 phase; |
860 |
|
861 |
struct ff_envelope envelope; |
862 |
|
863 |
__u32 custom_len; |
864 |
compat_uptr_t custom_data; |
865 |
}; |
866 |
#endif |
867 |
|
849 |
/** |
868 |
/** |
850 |
* struct ff_rumble_effect - defines parameters of a periodic force-feedback effect |
869 |
* struct ff_rumble_effect - defines parameters of a periodic force-feedback effect |
851 |
* @strong_magnitude: magnitude of the heavy motor |
870 |
* @strong_magnitude: magnitude of the heavy motor |
Lines 898-903
struct ff_effect {
Link Here
|
898 |
} u; |
917 |
} u; |
899 |
}; |
918 |
}; |
900 |
|
919 |
|
|
|
920 |
#ifdef CONFIG_COMPAT |
921 |
struct ff_effect32 { |
922 |
__u16 type; |
923 |
__s16 id; |
924 |
__u16 direction; |
925 |
struct ff_trigger trigger; |
926 |
struct ff_replay replay; |
927 |
|
928 |
union { |
929 |
struct ff_constant_effect constant; |
930 |
struct ff_ramp_effect ramp; |
931 |
struct ff_periodic_effect32 periodic; |
932 |
struct ff_condition_effect condition[2]; /* One for each axis */ |
933 |
struct ff_rumble_effect rumble; |
934 |
} u; |
935 |
}; |
936 |
#endif |
937 |
|
901 |
/* |
938 |
/* |
902 |
* Force feedback effect types |
939 |
* Force feedback effect types |
903 |
*/ |
940 |
*/ |
Lines 1362-1367
void input_ff_destroy(struct input_dev *
Link Here
|
1362 |
int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
1399 |
int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
1363 |
|
1400 |
|
1364 |
int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file); |
1401 |
int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file); |
|
|
1402 |
#ifdef CONFIG_COMPAT |
1403 |
int input_ff_upload32(struct input_dev *dev, struct ff_effect32 *effect32, struct file *file); |
1404 |
#endif |
1365 |
int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file); |
1405 |
int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file); |
1366 |
|
1406 |
|
1367 |
int input_ff_create_memless(struct input_dev *dev, void *data, |
1407 |
int input_ff_create_memless(struct input_dev *dev, void *data, |