Hi Henrik, > -----Original Message----- > From: Henrik Rydberg [mailto:rydberg@xxxxxxxxxxx] > Sent: Saturday, October 02, 2010 11:55 AM > > + has_x_sensors = hweight32(buf[0] & BU21013_SENSORS_EN_0_7); > > + has_y_sensors = hweight32(((buf[1] & BU21013_SENSORS_EN_8_15) | > > + ((buf[2] & BU21013_SENSORS_EN_16_23) << SHIFT_8)) >> > SHIFT_2); > > > The bitcounting hweight32 can actually be removed here. > This register values of touch controller used to know the valid touch. Otherwise we need do the calculate the co-ordinates and then decide to ignore. > > + if (!has_x_sensors || !has_y_sensors) > > + return 0; > > + > > + for (i = 0; i < MAX_FINGERS; i++) { > > + const u8 *p = &buf[4 * i + 3]; > > + unsigned int x = p[0] << SHIFT_2 | (p[1] & MASK_BITS); > > + unsigned int y = p[2] << SHIFT_2 | (p[3] & MASK_BITS); > > + if (x == 0 || y == 0) > > + continue; > > + pos_x[finger_down_count] = x; > > + pos_y[finger_down_count] = y; > > + finger_down_count++; > > + } > > + > > + input_set_abs_params(in_dev, ABS_MT_POSITION_X, 0, > > + pdata->x_max_res, 0, 0); > > + input_set_abs_params(in_dev, ABS_MT_POSITION_Y, 0, > > + pdata->y_max_res, 0, 0); > > + input_set_abs_params(in_dev, ABS_MT_TOUCH_MAJOR, 0, > > + max(pdata->x_max_res , pdata->y_max_res), 0, 0); > > > Same here - no ABS_MT_TOUCH_MAJOR, please. > According to MT documentation, we need to report this value. We observe without this value reporting in Pen down case, Android framework is not recognizing the touch. Thanks & Regards, Naveen -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html