[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YGImp7Fc/hjG4PFV@google.com>
Date: Mon, 29 Mar 2021 12:12:39 -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 v4 05/10] Input: wacom_i2c - Add support for distance and
tilt x/y
On Thu, Mar 25, 2021 at 09:52:25PM -0400, Alistair Francis wrote:
> This is based on the out of tree rM2 driver.
>
> Signed-off-by: Alistair Francis <alistair@...stair23.me>
> ---
> drivers/input/touchscreen/wacom_i2c.c | 25 +++++++++++++++++++++++--
> 1 file changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/wacom_i2c.c b/drivers/input/touchscreen/wacom_i2c.c
> index ee1829dd35f4..3b4bc514dc3f 100644
> --- a/drivers/input/touchscreen/wacom_i2c.c
> +++ b/drivers/input/touchscreen/wacom_i2c.c
> @@ -22,12 +22,16 @@
> #define WACOM_CMD_QUERY3 0x02
> #define WACOM_CMD_THROW0 0x05
> #define WACOM_CMD_THROW1 0x00
> -#define WACOM_QUERY_SIZE 19
> +#define WACOM_QUERY_SIZE 22
>
> struct wacom_features {
> int x_max;
> int y_max;
> int pressure_max;
> + int distance_max;
> + int distance_physical_max;
> + int tilt_x_max;
> + int tilt_y_max;
> char fw_version;
> };
>
> @@ -79,6 +83,10 @@ static int wacom_query_device(struct i2c_client *client,
> features->y_max = get_unaligned_le16(&data[5]);
> features->pressure_max = get_unaligned_le16(&data[11]);
> features->fw_version = get_unaligned_le16(&data[13]);
> + features->distance_max = data[15];
> + features->distance_physical_max = data[16];
> + features->tilt_x_max = get_unaligned_le16(&data[17]);
> + features->tilt_y_max = get_unaligned_le16(&data[19]);
Do other models also support distance and tilt? If not, this needs to be
made conditional.
Thanks.
--
Dmitry
Powered by blists - more mailing lists