From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Andrew Duggan <aduggan@synaptics.com>,
Christopher Heiny <cheiny@synaptics.com>,
linux-input@vger.kernel.org, Nick Dyer <nick@shmanahar.org>,
Chris Healy <cphealy@gmail.com>,
kernel@pengutronix.de, patchwork-lst@pengutronix.de
Subject: Re: [PATCH] Input: synaptics-rmi4: correctly swap clip values if axes are swapped
Date: Sun, 15 Jan 2017 15:23:40 -0800 [thread overview]
Message-ID: <20170115232340.GF23285@dtor-ws> (raw)
In-Reply-To: <20170113174324.3393-1-l.stach@pengutronix.de>
On Fri, Jan 13, 2017 at 06:43:24PM +0100, Lucas Stach wrote:
> The clip values need the same swapping as the maximium values if the
> sensor axes are swapped.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Applied, thank you.
> ---
> drivers/input/rmi4/rmi_2d_sensor.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/rmi4/rmi_2d_sensor.c b/drivers/input/rmi4/rmi_2d_sensor.c
> index 07007ff8e29f..8bb866c7b985 100644
> --- a/drivers/input/rmi4/rmi_2d_sensor.c
> +++ b/drivers/input/rmi4/rmi_2d_sensor.c
> @@ -144,8 +144,13 @@ static void rmi_2d_sensor_set_input_params(struct rmi_2d_sensor *sensor)
> int input_flags = 0;
>
> 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->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;
> if (sensor->axis_align.clip_x_high)
> --
> 2.11.0
>
--
Dmitry
prev parent reply other threads:[~2017-01-15 23:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 17:43 [PATCH] Input: synaptics-rmi4: correctly swap clip values if axes are swapped Lucas Stach
2017-01-15 23:23 ` Dmitry Torokhov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170115232340.GF23285@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=aduggan@synaptics.com \
--cc=cheiny@synaptics.com \
--cc=cphealy@gmail.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-input@vger.kernel.org \
--cc=nick@shmanahar.org \
--cc=patchwork-lst@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).