diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 262d1057c1da..341a6c3bf907 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -2467,14 +2467,14 @@ static int alps_update_device_area_ss4_v2(unsigned char otp[][4], if (IS_SS4PLUS_DEV(priv->dev_id)) { num_x_electrode = - SS4PLUS_NUMSENSOR_XOFFSET + (otp[0][2] & 0x0F); + SS4_NUMSENSOR_XOFFSET + (otp[1][0] & 0x0F); num_y_electrode = - SS4PLUS_NUMSENSOR_YOFFSET + ((otp[0][2] >> 4) & 0x0F); + SS4_NUMSENSOR_YOFFSET + ((otp[1][0] >> 4) & 0x0F); priv->x_max = - (num_x_electrode - 1) * SS4PLUS_COUNT_PER_ELECTRODE; + (num_x_electrode - 1) * SS4_COUNT_PER_ELECTRODE; priv->y_max = - (num_y_electrode - 1) * SS4PLUS_COUNT_PER_ELECTRODE; + (num_y_electrode - 1) * SS4_COUNT_PER_ELECTRODE; x_pitch = (otp[0][1] & 0x0F) + SS4PLUS_MIN_PITCH_MM; y_pitch = ((otp[0][1] >> 4) & 0x0F) + SS4PLUS_MIN_PITCH_MM; @@ -2500,6 +2500,11 @@ static int alps_update_device_area_ss4_v2(unsigned char otp[][4], priv->x_res = priv->x_max * 10 / x_phys; /* units / mm */ priv->y_res = priv->y_max * 10 / y_phys; /* units / mm */ + psmouse_err(psmouse, + "test1 pitch %dx%d num-electrodes %dx%d physical size %dx%dmm res %dx%d max %dx%d\n", + x_pitch, y_pitch, num_x_electrode, num_y_electrode, + x_phys / 10, y_phys / 10, priv->x_res, priv->y_res, priv->x_max, priv->y_max); + return 0; }