[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKmqyKMHoJWv=O0p_y6u34--njcsYxnWHg+EYzOFUnS3MFTvow@mail.gmail.com>
Date: Wed, 20 Oct 2021 21:28:27 +1000
From: Alistair Francis <alistair23@...il.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Ping Cheng <pinglinux@...il.com>,
Alistair Francis <alistair@...stair23.me>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
dl-linux-imx <linux-imx@....com>, Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
linux-input <linux-input@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v11 1/4] HID: wacom_sys: Add support for flipping the data values
On Wed, Oct 20, 2021 at 12:14 PM Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
>
> On Wed, Oct 20, 2021 at 11:44:50AM +1000, Alistair Francis wrote:
> > On Wed, Oct 20, 2021 at 11:05 AM Dmitry Torokhov
> > <dmitry.torokhov@...il.com> wrote:
> > >
> > > On Wed, Oct 20, 2021 at 09:33:13AM +1000, Alistair Francis wrote:
> > > > On Tue, Oct 19, 2021 at 11:51 AM Dmitry Torokhov
> > > > <dmitry.torokhov@...il.com> wrote:
> > > > >
> > > > > We already have touchscreen-inverted-x/y defined in
> > > > > Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml,
> > > > > why are they not sufficient?
> > > >
> > > > The touchscreen-* properties aren't applied to HID devices though, at
> > > > least not that I can tell.
> > >
> > > No, they are not currently, but that does not mean we need to establish
> > > a new set of properties (property names) for HID case.
> >
> > I can update the names to use the existing touchscreen ones.
> >
> > Do you have a hint of where this should be implemented though?
> >
> > Right now (without "HID: wacom: Add support for the AG14 Wacom
> > device") the wacom touchscreen is just registered as a generic HID
> > device. I don't see any good place in hid-core, hid-input or
> > hid-generic to invert the input values for this.
>
> I think the transformation should happen in
> hid-multitouch.c::mt_process_slot() using helpers from
> include/linux/input/touchscreen.h
Thanks for the help!
I have managed to get the device to be a hid-multitouch (instead of
hid-generic).
I also think I have figured out a way to get the properties to
hid-multitouch from the i2c-hid device. It requires a change to
touchscreen.c, but it's not a big change.
The main problem now is that hid-multitouch.c::mt_process_slot() isn't
actually called. The code just calls input_sync() from
hid-multitouch.c::mt_report(). It doesn't get to mt_process_slot() due
to rdata->is_mt_collection not being true. Setting
rdata->is_mt_collection to true causes userspace not to see the wacom
input any more.
Alistair
>
> I think the more challenging question is to how pass/attach struct
> touchscreen_properties * to the hid device (i expect the properties will
> be attached to i2c-hid device, but maybe we could create a sub-node of
> it and attach properties there.
>
> Thanks.
>
> --
> Dmitry
Powered by blists - more mailing lists