Input: synaptics-rmi4 - change F12 clip to inactive border debug
authorNick Dyer <nick@shmanahar.org>
Fri, 14 Apr 2017 21:43:25 +0000 (14:43 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 14 Apr 2017 21:52:31 +0000 (14:52 -0700)
The data in F12_2D_Ctrl8 corresponds to the inactive border width used by
the RMI device. It is not in pixel units and should not be treated as a
clip value.

Signed-off-by: Nick Dyer <nick@shmanahar.org>
Tested-by: Chris Healy <cphealy@gmail.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_f12.c

index 07aff4356fe0ea751984e59fbb7292b14bf9503e..8b0db086d68a9361e622bd680e021b9251c17562 100644 (file)
@@ -113,20 +113,16 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
        }
 
        if (rmi_register_desc_has_subpacket(item, 2)) {
-               sensor->axis_align.clip_x_low = buf[offset];
-               sensor->axis_align.clip_x_high = sensor->max_x
-                                                       - buf[offset + 1];
-               sensor->axis_align.clip_y_low = buf[offset + 2];
-               sensor->axis_align.clip_y_high = sensor->max_y
-                                                       - buf[offset + 3];
+               /* Units 1/128 sensor pitch */
+               rmi_dbg(RMI_DEBUG_FN, &fn->dev,
+                       "%s: Inactive Border xlo:%d xhi:%d ylo:%d yhi:%d\n",
+                       __func__,
+                       buf[offset], buf[offset + 1],
+                       buf[offset + 2], buf[offset + 3]);
+
                offset += 4;
        }
 
-       rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: x low: %d x high: %d y low: %d y high: %d\n",
-               __func__,
-               sensor->axis_align.clip_x_low, sensor->axis_align.clip_x_high,
-               sensor->axis_align.clip_y_low, sensor->axis_align.clip_y_high);
-
        if (rmi_register_desc_has_subpacket(item, 3)) {
                rx_receivers = buf[offset];
                tx_receivers = buf[offset + 1];