for (i = 0;i < 4; i++)
{
zerocount = 0;
for (row = 0; row < kp->pdata->num_rows; row++) {
if(!((new_data[row] >> i) & 0x01))
{
zerocount++;
}
}
if(zerocount > 2)
{
for (row = 0; row < kp->pdata->num_rows; row++)
{
if(!((new_data[row] >> i) & 0x01))
{
new_data[row] |= 0x1 << i;
state[row] |= 0x1 << i;
}
}
}
}