[Droid Incredible Android Development] tchebb:
I've had this patch for a while now, but I decided to finally post it here in the hope it might help someone. I kept hearing about how much better the Incredible's touchscreen is compared to the Nexus One's, so I wondered why it could only handle a maximum of 2 touches. It seems that the Incredible uses the Atmel mXT224 as its touch controller. The summary from Atmel clearly states "True 12-bit multiple touch with independent XY tracking for up to 10 concurrent touches in real time with touch size reporting." It turns out, it's actually quite a simple kernel mod to enable all 10 touches (although I've noticed the tracking quality start to degrade above 5). I've been running this on my Incredible for a month or so, and I've noticed no ill effects from it.

All you need to do is edit arch/arm/mach-msm/board-incrediblec.c, and replace

struct atmel_i2c_platform_data incrediblec_atmel_ts_data[] = {
{
.version = 0x016,
.abs_x_min = 1,
.abs_x_max = 1023,
.abs_y_min = 2,
.abs_y_max = 966,
.abs_pressure_min = 0,
.abs_pressure_max = 255,
.abs_width_min = 0,
.abs_width_max = 20,
.gpio_irq = INCREDIBLEC_GPIO_TP_INT_N,
.power = incrediblec_atmel_ts_power,
.config_T6 = {0, 0, 0, 0, 0, 0},
.config_T7 = {50, 15, 25},
.config_T8 = {10, 0, 20, 10, 0, 0, 5, 15},
.config_T9 = {139, 0, 0, 18, 12, 0, 16, 38, 3, 7, 0, 5, 2, 15, 2, 10, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 159, 47, 149, 81, 40},
.config_T15 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T19 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T20 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T22 = {15, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 0, 7, 18, 25, 30, 0},
.config_T23 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T24 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T25 = {3, 0, 200, 50, 64, 31, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T27 = {0, 0, 0, 0, 0, 0, 0},
.config_T28 = {0, 0, 2, 4, 8, 60},
.object_crc = {0xDB, 0xBF, 0x60},
.cable_config = {35, 30, 8, 16},
.GCAF_level = {20, 24, 28, 40, 63},
.filter_level = {15, 60, 963, 1008},
},
{
.version = 0x015,
.abs_x_min = 13,
.abs_x_max = 1009,
.abs_y_min = 15,
.abs_y_max = 960,
.abs_pressure_min = 0,
.abs_pressure_max = 255,
.abs_width_min = 0,
.abs_width_max = 20,
.gpio_irq = INCREDIBLEC_GPIO_TP_INT_N,
.power = incrediblec_atmel_ts_power,
.config_T6 = {0, 0, 0, 0, 0, 0},
.config_T7 = {50, 15, 25},
.config_T8 = {12, 0, 20, 20, 0, 0, 20, 0},
.config_T9 = {139, 0, 0, 18, 12, 0, 32, 40, 2, 7, 0, 5, 2, 0, 2, 10, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, 47, 149, 81},
.config_T15 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T19 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T20 = {7, 0, 0, 0, 0, 0, 0, 30, 20, 4, 15, 5},
.config_T22 = {7, 0, 0, 25, 0, -25, 255, 4, 50, 0, 1, 10, 15, 20, 25, 30, 4},
.config_T23 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T24 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T25 = {3, 0, 200, 50, 64, 31, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T27 = {0, 0, 0, 0, 0, 0, 0},
.config_T28 = {0, 0, 2, 4, 8, 60},
.object_crc = {0x19, 0x87, 0x7E},
},
{
.version = 0x014,
.abs_x_min = 13,
.abs_x_max = 1009,
.abs_y_min = 15,
.abs_y_max = 960,
.abs_pressure_min = 0,
.abs_pressure_max = 255,
.abs_width_min = 0,
.abs_width_max = 20,
.gpio_irq = INCREDIBLEC_GPIO_TP_INT_N,
.power = incrediblec_atmel_ts_power,
.config_T6 = {0, 0, 0, 0, 0, 0},
.config_T7 = {50, 15, 25},
.config_T8 = {12, 0, 20, 20, 0, 0, 10, 15},
.config_T9 = {3, 0, 0, 18, 12, 0, 48, 45, 2, 7, 0, 0, 0, 0, 2, 10, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 47, 143, 81},
.config_T15 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T19 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T20 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T22 = {5, 0, 0, 25, 0, -25, 255, 4, 50, 0, 1, 10, 15, 20, 25, 30, 4},
.config_T23 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T24 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T25 = {3, 0, 200, 50, 64, 31, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T27 = {0, 0, 0, 0, 0, 0, 0},
.config_T28 = {0, 0, 2, 4, 8, 60},
}
};

with

struct atmel_i2c_platform_data incrediblec_atmel_ts_data[] = {
{
.version = 0x016,
.abs_x_min = 1,
.abs_x_max = 1023,
.abs_y_min = 2,
.abs_y_max = 966,
.abs_pressure_min = 0,
.abs_pressure_max = 255,
.abs_width_min = 0,
.abs_width_max = 20,
.gpio_irq = INCREDIBLEC_GPIO_TP_INT_N,
.power = incrediblec_atmel_ts_power,
.config_T6 = {0, 0, 0, 0, 0, 0},
.config_T7 = {50, 15, 25},
.config_T8 = {10, 0, 20, 10, 0, 0, 5, 15},
.config_T9 = {139, 0, 0, 18, 12, 0, 16, 38, 3, 7, 0, 5, 2, 15, [B]10[/B], 10, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 159, 47, 149, 81, 40},
.config_T15 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T19 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T20 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T22 = {15, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 0, 7, 18, 25, 30, 0},
.config_T23 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T24 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T25 = {3, 0, 200, 50, 64, 31, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T27 = {0, 0, 0, 0, 0, 0, 0},
.config_T28 = {0, 0, 2, 4, 8, 60},
.object_crc = {0xDB, 0xBF, 0x60},
.cable_config = {35, 30, 8, 16},
.GCAF_level = {20, 24, 28, 40, 63},
.filter_level = {15, 60, 963, 1008},
},
{
.version = 0x015,
.abs_x_min = 13,
.abs_x_max = 1009,
.abs_y_min = 15,
.abs_y_max = 960,
.abs_pressure_min = 0,
.abs_pressure_max = 255,
.abs_width_min = 0,
.abs_width_max = 20,
.gpio_irq = INCREDIBLEC_GPIO_TP_INT_N,
.power = incrediblec_atmel_ts_power,
.config_T6 = {0, 0, 0, 0, 0, 0},
.config_T7 = {50, 15, 25},
.config_T8 = {12, 0, 20, 20, 0, 0, 20, 0},
.config_T9 = {139, 0, 0, 18, 12, 0, 32, 40, 2, 7, 0, 5, 2, 0, [B]10[/B], 10, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, 47, 149, 81},
.config_T15 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T19 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T20 = {7, 0, 0, 0, 0, 0, 0, 30, 20, 4, 15, 5},
.config_T22 = {7, 0, 0, 25, 0, -25, 255, 4, 50, 0, 1, 10, 15, 20, 25, 30, 4},
.config_T23 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T24 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T25 = {3, 0, 200, 50, 64, 31, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T27 = {0, 0, 0, 0, 0, 0, 0},
.config_T28 = {0, 0, 2, 4, 8, 60},
.object_crc = {0x19, 0x87, 0x7E},
},
{
.version = 0x014,
.abs_x_min = 13,
.abs_x_max = 1009,
.abs_y_min = 15,
.abs_y_max = 960,
.abs_pressure_min = 0,
.abs_pressure_max = 255,
.abs_width_min = 0,
.abs_width_max = 20,
.gpio_irq = INCREDIBLEC_GPIO_TP_INT_N,
.power = incrediblec_atmel_ts_power,
.config_T6 = {0, 0, 0, 0, 0, 0},
.config_T7 = {50, 15, 25},
.config_T8 = {12, 0, 20, 20, 0, 0, 10, 15},
.config_T9 = {3, 0, 0, 18, 12, 0, 48, 45, 2, 7, 0, 0, 0, 0, [B]10[/B], 10, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 47, 143, 81},
.config_T15 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T19 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T20 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T22 = {5, 0, 0, 25, 0, -25, 255, 4, 50, 0, 1, 10, 15, 20, 25, 30, 4},
.config_T23 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T24 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T25 = {3, 0, 200, 50, 64, 31, 0, 0, 0, 0, 0, 0, 0, 0},
.config_T27 = {0, 0, 0, 0, 0, 0, 0},
.config_T28 = {0, 0, 2, 4, 8, 60},
}
};

For those who didn't spot the change, it's in config_t9 (highlighted in bold). You can, of course, change the 10 to anything you want (I've only tested with between 2 and 10, though) and that will be set as the maximum number of touches.

I hope this helps someone.