@@ -16,6 +16,7 @@
* 1.1 - N-trig - Add Change Log and defines of MTM firmware.
* Add debug Paramater change Driver name in hid_driver structure
* 1.2 - N-trig - Change ntrig_input_mapping
+ * 1.3 - N-trig - Change ntrig_input_mapped
*/
/*
@@ -182,14 +183,23 @@ static int ntrig_input_mapped(struct hid_device *hdev, struct hid_input *hi,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
{
- /* No special mappings needed for the pen and single touch */
- if (field->physical)
- return 0;
-
- if (usage->type == EV_KEY || usage->type == EV_REL
- || usage->type == EV_ABS)
- clear_bit(usage->code, *bit);
-
+ /*
+ * Maps Key For Pen And Touch events
+ * MSC events used to transfer information about finger status
+ * In cureent Frame
+ * todo: Maybe later transfer to mt proctol
+ * if there will be relevant events
+ */
+ struct input_dev *input = hi->input;
+ set_bit(BTN_LEFT, input->keybit);
+ set_bit(BTN_RIGHT, input->keybit);
+ set_bit(EV_MSC, input->evbit);
+ set_bit(MSC_PULSELED, input->mscbit);
+ set_bit(MSC_SERIAL, input->mscbit);
+ set_bit(MSC_SCAN, input->mscbit);
+
+ input_set_abs_params(hi->input, ABS_PRESSURE,
+ 0/*Min*/, 255 /*Max*/, 0, 0);
return 0;
}