#include <linux/device.h>
#include <linux/hid.h>
#include <linux/module.h>
+#include <linux/slab.h>
-MODULE_VERSION("0.6");
MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>");
MODULE_DESCRIPTION("Stantum HID multitouch panels");
MODULE_LICENSE("GPL");
case HID_DG_DEVICEINDEX:
case HID_DG_CONTACTCOUNT:
case HID_DG_CONTACTMAX:
- case HID_DG_TIPPRESSURE:
return -1;
case HID_DG_TIPSWITCH:
input_set_abs_params(hi->input, ABS_MT_ORIENTATION,
1, 1, 0, 0);
return 1;
+ case HID_DG_TIPPRESSURE:
+ hid_map_usage(hi, usage, bit, max,
+ EV_ABS, ABS_MT_PRESSURE);
+ return 1;
+
case HID_DG_CONTACTID:
hid_map_usage(hi, usage, bit, max,
EV_ABS, ABS_MT_TRACKING_ID);
input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, wide ? sd->w : sd->h);
input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, wide ? sd->h : sd->w);
-#if 0
- /* MT_PRESSURE does not exist yet */
input_event(input, EV_ABS, ABS_MT_PRESSURE, sd->z);
-#endif
input_mt_sync(input);
sd->valid = false;
- sd->first = false;
/* touchscreen emulation */
if (sd->first) {
input_event(input, EV_ABS, ABS_X, sd->x);
input_event(input, EV_ABS, ABS_Y, sd->y);
}
+ sd->first = false;
}