Lines Matching defs:mt

17 #include <linux/input/mt.h>
383 * Process bitmap data from semi-mt protocols. Returns the number of
389 * These points are returned in fields->mt when the return value
496 fields->mt[0] = fields->st;
497 fields->mt[1] = corner[priv->second_touch];
517 input_mt_assign_slots(dev, slot, f->mt, n, 0);
519 alps_set_slot(dev, slot[i], f->mt[i].x, f->mt[i].y);
530 /* Use st data when we don't have mt data */
532 f->mt[0].x = f->st.x;
533 f->mt[0].y = f->st.y;
539 alps_set_slot(dev, 0, f->mt[0].x, f->mt[0].y);
541 alps_set_slot(dev, 1, f->mt[1].x, f->mt[1].y);
969 static void alps_get_finger_coordinate_v7(struct input_mt_pos *mt,
973 mt[0].x = ((pkt[2] & 0x80) << 4);
974 mt[0].x |= ((pkt[2] & 0x3F) << 5);
975 mt[0].x |= ((pkt[3] & 0x30) >> 1);
976 mt[0].x |= (pkt[3] & 0x07);
977 mt[0].y = (pkt[1] << 3) | (pkt[0] & 0x07);
979 mt[1].x = ((pkt[3] & 0x80) << 4);
980 mt[1].x |= ((pkt[4] & 0x80) << 3);
981 mt[1].x |= ((pkt[4] & 0x3F) << 4);
982 mt[1].y = ((pkt[5] & 0x80) << 3);
983 mt[1].y |= ((pkt[5] & 0x3F) << 4);
987 mt[1].x &= ~0x000F;
988 mt[1].y |= 0x000F;
990 if (mt[1].y == 0x7ff && mt[1].x == 0xff0) {
991 mt[1].x = 0;
997 mt[1].x &= ~0x003F;
998 mt[1].y &= ~0x0020;
999 mt[1].y |= ((pkt[4] & 0x02) << 4);
1000 mt[1].y |= 0x001F;
1004 mt[1].x &= ~0x003F;
1005 mt[1].x |= (pkt[0] & 0x20);
1006 mt[1].y |= 0x000F;
1010 mt[0].y = 0x7FF - mt[0].y;
1011 mt[1].y = 0x7FF - mt[1].y;
1014 static int alps_get_mt_count(struct input_mt_pos *mt)
1019 if (mt[i].x != 0 || mt[i].y != 0)
1059 alps_get_finger_coordinate_v7(f->mt, p, pkt_id);
1062 f->fingers = alps_get_mt_count(f->mt);
1077 /* Sometimes a single touch is reported in mt[1] rather then mt[0] */
1078 if (f->fingers == 1 && f->mt[0].x == 0 && f->mt[0].y == 0) {
1079 f->mt[0].x = f->mt[1].x;
1080 f->mt[0].y = f->mt[1].y;
1081 f->mt[1].x = 0;
1082 f->mt[1].y = 0;
1127 alps_report_mt_data(psmouse, alps_get_mt_count(f->mt));
1189 f->mt[0].x = SS4_1F_X_V2(p);
1190 f->mt[0].y = SS4_1F_Y_V2(p);
1206 f->mt[0].x = SS4_PLUS_BTL_MF_X_V2(p, 0);
1207 f->mt[1].x = SS4_PLUS_BTL_MF_X_V2(p, 1);
1209 f->mt[0].x = SS4_BTL_MF_X_V2(p, 0);
1210 f->mt[1].x = SS4_BTL_MF_X_V2(p, 1);
1212 f->mt[0].y = SS4_BTL_MF_Y_V2(p, 0);
1213 f->mt[1].y = SS4_BTL_MF_Y_V2(p, 1);
1216 f->mt[0].x = SS4_PLUS_STD_MF_X_V2(p, 0);
1217 f->mt[1].x = SS4_PLUS_STD_MF_X_V2(p, 1);
1219 f->mt[0].x = SS4_STD_MF_X_V2(p, 0);
1220 f->mt[1].x = SS4_STD_MF_X_V2(p, 1);
1222 f->mt[0].y = SS4_STD_MF_Y_V2(p, 0);
1223 f->mt[1].y = SS4_STD_MF_Y_V2(p, 1);
1240 f->mt[2].x = SS4_PLUS_BTL_MF_X_V2(p, 0);
1241 f->mt[3].x = SS4_PLUS_BTL_MF_X_V2(p, 1);
1244 f->mt[2].x = SS4_BTL_MF_X_V2(p, 0);
1245 f->mt[3].x = SS4_BTL_MF_X_V2(p, 1);
1250 f->mt[2].y = SS4_BTL_MF_Y_V2(p, 0);
1251 f->mt[3].y = SS4_BTL_MF_Y_V2(p, 1);
1254 f->mt[2].x = SS4_PLUS_STD_MF_X_V2(p, 0);
1255 f->mt[3].x = SS4_PLUS_STD_MF_X_V2(p, 1);
1258 f->mt[2].x = SS4_STD_MF_X_V2(p, 0);
1259 f->mt[3].x = SS4_STD_MF_X_V2(p, 1);
1264 f->mt[2].y = SS4_STD_MF_Y_V2(p, 0);
1265 f->mt[3].y = SS4_STD_MF_Y_V2(p, 1);
1273 } else if (f->mt[3].x == no_data_x &&
1274 f->mt[3].y == no_data_y) {
1275 f->mt[3].x = 0;
1276 f->mt[3].y = 0;