lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKmqyKPDROFkAFgSjSDeTfhtZsArn4BbON9tyb1qTb_QcV5=xg@mail.gmail.com>
Date:   Mon, 6 Dec 2021 20:46:50 +1000
From:   Alistair Francis <alistair23@...il.com>
To:     Andreas Kemnade <andreas@...nade.info>
Cc:     Alistair Francis <alistair@...stair23.me>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>,
        linux-input <linux-input@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Rob Herring <robh+dt@...nel.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Henrik Rydberg <rydberg@...math.org>,
        Mylène Josserand <mylene.josserand@...tlin.com>,
        Maxime Ripard <maxime.ripard@...tlin.com>
Subject: Re: [PATCH v3 1/4] Input: Add driver for Cypress Generation 5 touchscreen

On Sun, Dec 5, 2021 at 8:32 AM Andreas Kemnade <andreas@...nade.info> wrote:
>
> Hi,
>
>
> On Thu,  2 Dec 2021 22:20:18 +1000
> Alistair Francis <alistair@...stair23.me> wrote:
>
> > From: Mylène Josserand <mylene.josserand@...tlin.com>
> >
> > This is the basic driver for the Cypress TrueTouch Gen5 touchscreen
> > controllers. This driver supports only the I2C bus but it uses regmap
> > so SPI support could be added later.
> > The touchscreen can retrieve some defined zone that are handled as
> > buttons (according to the hardware). That is why it handles
> > button and multitouch events.
> >
> > Reviewed-by: Maxime Ripard <maxime.ripard@...tlin.com>
> > Signed-off-by: Mylène Josserand <mylene.josserand@...tlin.com>
> > Message-Id: <20180703094309.18514-2-mylene.josserand@...tlin.com>
> > Signed-off-by: Alistair Francis <alistair@...stair23.me>
>
> I finally got it working. The order of initialisation is important.
> Params are copied on input_mt_init_slots() from ABS_MT* to ABS_*, so you
> have to set params first.
>
> Here is the patch i need on top of this one to make it actually work
> with X (evdev and libinput is tested):
>
> diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c
> index b5d96eb71e46..3894ec85a732 100644
> --- a/drivers/input/touchscreen/cyttsp5.c
> +++ b/drivers/input/touchscreen/cyttsp5.c
> @@ -415,19 +415,12 @@ static int cyttsp5_setup_input_device(struct device *dev)
>         int max_x_tmp, max_y_tmp;
>         int error;
>
> -       __set_bit(EV_REL, ts->input->evbit);

Does it work with this still included? I need this for my userspace program.

Alistair

> -
>         max_x_tmp = si->sensing_conf_data.res_x;
>         max_y_tmp = si->sensing_conf_data.res_y;
>         max_x = max_x_tmp - 1;
>         max_y = max_y_tmp - 1;
>         max_p = si->sensing_conf_data.max_z;
>
> -       error = input_mt_init_slots(ts->input, si->tch_abs[CY_TCH_T].max,
> -               INPUT_MT_DROP_UNUSED | INPUT_MT_POINTER);
> -       if (error < 0)
> -               return error;
> -
>         input_set_abs_params(ts->input, ABS_MT_POSITION_X, 0, max_x, 0, 0);
>         input_set_abs_params(ts->input, ABS_MT_POSITION_Y, 0, max_y, 0, 0);
>         input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, max_p, 0, 0);
> @@ -435,6 +428,11 @@ static int cyttsp5_setup_input_device(struct device *dev)
>         input_set_abs_params(ts->input, ABS_MT_TOUCH_MAJOR, 0, MAX_AREA, 0, 0);
>         input_set_abs_params(ts->input, ABS_MT_TOUCH_MINOR, 0, MAX_AREA, 0, 0);
>
> +       error = input_mt_init_slots(ts->input, si->tch_abs[CY_TCH_T].max,
> +               INPUT_MT_DROP_UNUSED | INPUT_MT_DIRECT);
> +       if (error < 0)
> +               return error;
> +
>         error = input_register_device(ts->input);
>         if (error < 0)
>                 dev_err(dev, "Error, failed register input device r=%d\n", error);
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ