All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Alistair Francis <alistair23@gmail.com>
Cc: "Andreas Kemnade" <andreas@kemnade.info>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-input <linux-input@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Henrik Rydberg" <rydberg@bitmath.org>,
	"Mylène Josserand" <mylene.josserand@bootlin.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>
Subject: Re: [PATCH v3 1/4] Input: Add driver for Cypress Generation 5 touchscreen
Date: Mon, 6 Dec 2021 23:06:04 -0800	[thread overview]
Message-ID: <Ya8H3AHRqeJj7IUr@google.com> (raw)
In-Reply-To: <CAKmqyKPDROFkAFgSjSDeTfhtZsArn4BbON9tyb1qTb_QcV5=xg@mail.gmail.com>

On Mon, Dec 06, 2021 at 08:46:50PM +1000, Alistair Francis wrote:
> On Sun, Dec 5, 2021 at 8:32 AM Andreas Kemnade <andreas@kemnade.info> wrote:
> >
> > Hi,
> >
> >
> > On Thu,  2 Dec 2021 22:20:18 +1000
> > Alistair Francis <alistair@alistair23.me> wrote:
> >
> > > From: Mylène Josserand <mylene.josserand@bootlin.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@bootlin.com>
> > > Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
> > > Message-Id: <20180703094309.18514-2-mylene.josserand@bootlin.com>
> > > Signed-off-by: Alistair Francis <alistair@alistair23.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.

You need to fix your program, the kernel should not be declaring
capabilities that the device does not support.

Thanks.

-- 
Dmitry

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Alistair Francis <alistair23@gmail.com>
Cc: "Andreas Kemnade" <andreas@kemnade.info>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-input <linux-input@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Henrik Rydberg" <rydberg@bitmath.org>,
	"Mylène Josserand" <mylene.josserand@bootlin.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>
Subject: Re: [PATCH v3 1/4] Input: Add driver for Cypress Generation 5 touchscreen
Date: Mon, 6 Dec 2021 23:06:04 -0800	[thread overview]
Message-ID: <Ya8H3AHRqeJj7IUr@google.com> (raw)
In-Reply-To: <CAKmqyKPDROFkAFgSjSDeTfhtZsArn4BbON9tyb1qTb_QcV5=xg@mail.gmail.com>

On Mon, Dec 06, 2021 at 08:46:50PM +1000, Alistair Francis wrote:
> On Sun, Dec 5, 2021 at 8:32 AM Andreas Kemnade <andreas@kemnade.info> wrote:
> >
> > Hi,
> >
> >
> > On Thu,  2 Dec 2021 22:20:18 +1000
> > Alistair Francis <alistair@alistair23.me> wrote:
> >
> > > From: Mylène Josserand <mylene.josserand@bootlin.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@bootlin.com>
> > > Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
> > > Message-Id: <20180703094309.18514-2-mylene.josserand@bootlin.com>
> > > Signed-off-by: Alistair Francis <alistair@alistair23.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.

You need to fix your program, the kernel should not be declaring
capabilities that the device does not support.

Thanks.

-- 
Dmitry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-12-07  7:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 12:20 [PATCH v3 0/4] Add support for the Cypress cyttsp5 Alistair Francis
2021-12-02 12:20 ` Alistair Francis
2021-12-02 12:20 ` [PATCH v3 1/4] Input: Add driver for Cypress Generation 5 touchscreen Alistair Francis
2021-12-02 12:20   ` Alistair Francis
2021-12-04 19:46   ` Andreas Kemnade
2021-12-04 19:46     ` Andreas Kemnade
2021-12-04 22:32   ` Andreas Kemnade
2021-12-04 22:32     ` Andreas Kemnade
2021-12-06 10:46     ` Alistair Francis
2021-12-06 10:46       ` Alistair Francis
2021-12-07  7:06       ` Dmitry Torokhov [this message]
2021-12-07  7:06         ` Dmitry Torokhov
2021-12-06 23:47   ` kernel test robot
2021-12-06 23:47     ` kernel test robot
2021-12-06 23:47     ` kernel test robot
2021-12-13  5:58   ` Dmitry Torokhov
2021-12-13  5:58     ` Dmitry Torokhov
2021-12-23 13:49   ` Andy Shevchenko
2021-12-23 13:49     ` Andy Shevchenko
2021-12-02 12:20 ` [PATCH v3 2/4] Documentation: DT: bindings: input: Add documentation for cyttsp5 Alistair Francis
2021-12-02 12:20   ` Alistair Francis
2021-12-02 13:58   ` Rob Herring
2021-12-02 13:58     ` Rob Herring
2021-12-06 20:52   ` Rob Herring
2021-12-06 20:52     ` Rob Herring
2021-12-02 12:20 ` [PATCH v3 3/4] ARM: imx_v6_v7_defconfig: Enable the cyttsp5 touchscreen Alistair Francis
2021-12-02 12:20   ` Alistair Francis
2021-12-02 12:20 ` [PATCH v3 4/4] ARM: dts: imx7d: remarkable2: Enable the cyttsp5 Alistair Francis
2021-12-02 12:20   ` Alistair Francis

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=Ya8H3AHRqeJj7IUr@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=alistair23@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=andreas@kemnade.info \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=mylene.josserand@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=rydberg@bitmath.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.