[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFentDIVXUmUT9Ya@google.com>
Date: Sun, 21 Mar 2021 13:08:20 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Alistair Francis <alistair@...stair23.me>
Cc: linux-input@...r.kernel.org, linux-imx@....com,
kernel@...gutronix.de, linux-kernel@...r.kernel.org,
alistair23@...il.com
Subject: Re: [PATCH v3 4/9] Input: wacom_i2c - Add touchscren properties
On Sun, Mar 21, 2021 at 10:10:44AM -0400, Alistair Francis wrote:
> Connect touchscreen properties to the wacom_i2c.
>
> Signed-off-by: Alistair Francis <alistair@...stair23.me>
> ---
> drivers/input/touchscreen/wacom_i2c.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/input/touchscreen/wacom_i2c.c b/drivers/input/touchscreen/wacom_i2c.c
> index fc0bf583d33b..9b2ed0463d09 100644
> --- a/drivers/input/touchscreen/wacom_i2c.c
> +++ b/drivers/input/touchscreen/wacom_i2c.c
> @@ -11,6 +11,7 @@
> #include <linux/i2c.h>
> #include <linux/slab.h>
> #include <linux/irq.h>
> +#include <linux/input/touchscreen.h>
> #include <linux/interrupt.h>
> #include <linux/of.h>
> #include <asm/unaligned.h>
> @@ -33,6 +34,7 @@ struct wacom_features {
> struct wacom_i2c {
> struct i2c_client *client;
> struct input_dev *input;
> + struct touchscreen_properties props;
> u8 data[WACOM_QUERY_SIZE];
> bool prox;
> int tool;
> @@ -188,6 +190,7 @@ static int wacom_i2c_probe(struct i2c_client *client,
> __set_bit(BTN_STYLUS2, input->keybit);
> __set_bit(BTN_TOUCH, input->keybit);
>
> + touchscreen_parse_properties(input, true, &wac_i2c->props);
> input_set_abs_params(input, ABS_X, 0, features.x_max, 0, 0);
> input_set_abs_params(input, ABS_Y, 0, features.y_max, 0, 0);
> input_set_abs_params(input, ABS_PRESSURE,
Please also use touchscreen_report_pos() so flipping and swapping of
axes also works.
Thanks.
--
Dmitry
Powered by blists - more mailing lists