提交 630a7fa0 编写于 作者: L Lucas Stach 提交者: Dmitry Torokhov

Input: synaptics-rmi4 - correctly swap clip values if axes are swapped

The clip values need the same swapping as the maximum values if the
sensor axes are swapped.
Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 3a11c0e1
...@@ -144,8 +144,13 @@ static void rmi_2d_sensor_set_input_params(struct rmi_2d_sensor *sensor) ...@@ -144,8 +144,13 @@ static void rmi_2d_sensor_set_input_params(struct rmi_2d_sensor *sensor)
int input_flags = 0; int input_flags = 0;
if (sensor->report_abs) { if (sensor->report_abs) {
if (sensor->axis_align.swap_axes) if (sensor->axis_align.swap_axes) {
swap(sensor->max_x, sensor->max_y); swap(sensor->max_x, sensor->max_y);
swap(sensor->axis_align.clip_x_low,
sensor->axis_align.clip_y_low);
swap(sensor->axis_align.clip_x_high,
sensor->axis_align.clip_y_high);
}
sensor->min_x = sensor->axis_align.clip_x_low; sensor->min_x = sensor->axis_align.clip_x_low;
if (sensor->axis_align.clip_x_high) if (sensor->axis_align.clip_x_high)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册