diff options
author | Nick Dyer <nick@shmanahar.org> | 2017-04-14 17:43:25 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-04-14 17:52:31 -0400 |
commit | 25670fb0373013ad9cdb2676afb468e4d88e1d53 (patch) | |
tree | 0a9b3987ff94b0fdb4aa824bf89af99f2d996515 | |
parent | 72fe38704c92e63459dd362cd27f9b32a63bbb48 (diff) |
Input: synaptics-rmi4 - change F12 clip to inactive border debug
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>
-rw-r--r-- | drivers/input/rmi4/rmi_f12.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/input/rmi4/rmi_f12.c b/drivers/input/rmi4/rmi_f12.c index 07aff4356fe0..8b0db086d68a 100644 --- a/drivers/input/rmi4/rmi_f12.c +++ b/drivers/input/rmi4/rmi_f12.c | |||
@@ -113,20 +113,16 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12) | |||
113 | } | 113 | } |
114 | 114 | ||
115 | if (rmi_register_desc_has_subpacket(item, 2)) { | 115 | if (rmi_register_desc_has_subpacket(item, 2)) { |
116 | sensor->axis_align.clip_x_low = buf[offset]; | 116 | /* Units 1/128 sensor pitch */ |
117 | sensor->axis_align.clip_x_high = sensor->max_x | 117 | rmi_dbg(RMI_DEBUG_FN, &fn->dev, |
118 | - buf[offset + 1]; | 118 | "%s: Inactive Border xlo:%d xhi:%d ylo:%d yhi:%d\n", |
119 | sensor->axis_align.clip_y_low = buf[offset + 2]; | 119 | __func__, |
120 | sensor->axis_align.clip_y_high = sensor->max_y | 120 | buf[offset], buf[offset + 1], |
121 | - buf[offset + 3]; | 121 | buf[offset + 2], buf[offset + 3]); |
122 | |||
122 | offset += 4; | 123 | offset += 4; |
123 | } | 124 | } |
124 | 125 | ||
125 | rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: x low: %d x high: %d y low: %d y high: %d\n", | ||
126 | __func__, | ||
127 | sensor->axis_align.clip_x_low, sensor->axis_align.clip_x_high, | ||
128 | sensor->axis_align.clip_y_low, sensor->axis_align.clip_y_high); | ||
129 | |||
130 | if (rmi_register_desc_has_subpacket(item, 3)) { | 126 | if (rmi_register_desc_has_subpacket(item, 3)) { |
131 | rx_receivers = buf[offset]; | 127 | rx_receivers = buf[offset]; |
132 | tx_receivers = buf[offset + 1]; | 128 | tx_receivers = buf[offset + 1]; |