From: Alistair Francis <alistair23@gmail.com> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ping Cheng <pinglinux@gmail.com>, Alistair Francis <alistair@alistair23.me>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, dl-linux-imx <linux-imx@nxp.com>, Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <benjamin.tissoires@redhat.com>, linux-input <linux-input@vger.kernel.org>, devicetree <devicetree@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH v11 1/4] HID: wacom_sys: Add support for flipping the data values Date: Wed, 20 Oct 2021 21:28:27 +1000 [thread overview] Message-ID: <CAKmqyKMHoJWv=O0p_y6u34--njcsYxnWHg+EYzOFUnS3MFTvow@mail.gmail.com> (raw) In-Reply-To: <YW97lwsMrLHetJGy@google.com> On Wed, Oct 20, 2021 at 12:14 PM Dmitry Torokhov <dmitry.torokhov@gmail.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@gmail.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@gmail.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
WARNING: multiple messages have this Message-ID (diff)
From: Alistair Francis <alistair23@gmail.com> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ping Cheng <pinglinux@gmail.com>, Alistair Francis <alistair@alistair23.me>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, dl-linux-imx <linux-imx@nxp.com>, Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <benjamin.tissoires@redhat.com>, linux-input <linux-input@vger.kernel.org>, devicetree <devicetree@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH v11 1/4] HID: wacom_sys: Add support for flipping the data values Date: Wed, 20 Oct 2021 21:28:27 +1000 [thread overview] Message-ID: <CAKmqyKMHoJWv=O0p_y6u34--njcsYxnWHg+EYzOFUnS3MFTvow@mail.gmail.com> (raw) In-Reply-To: <YW97lwsMrLHetJGy@google.com> On Wed, Oct 20, 2021 at 12:14 PM Dmitry Torokhov <dmitry.torokhov@gmail.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@gmail.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@gmail.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-10-20 11:28 UTC|newest] Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-09 11:43 [PATCH v11 1/4] HID: wacom_sys: Add support for flipping the data values Alistair Francis 2021-10-09 11:43 ` Alistair Francis 2021-10-09 11:43 ` [PATCH v11 2/4] HID: wacom: Add support for the AG14 Wacom device Alistair Francis 2021-10-09 11:43 ` Alistair Francis 2021-10-09 13:41 ` kernel test robot 2021-10-09 13:41 ` kernel test robot 2021-10-09 13:41 ` kernel test robot 2021-10-09 14:32 ` kernel test robot 2021-10-09 14:32 ` kernel test robot 2021-10-09 14:32 ` kernel test robot 2021-10-09 11:43 ` [PATCH v11 3/4] ARM: imx_v6_v7_defconfig: Enable HID I2C Alistair Francis 2021-10-09 11:43 ` Alistair Francis 2021-10-15 2:50 ` Shawn Guo 2021-10-15 2:50 ` Shawn Guo 2021-10-09 11:43 ` [PATCH v11 4/4] ARM: dts: imx7d: remarkable2: add wacom digitizer device Alistair Francis 2021-10-09 11:43 ` Alistair Francis 2021-10-10 8:24 ` kernel test robot 2021-10-10 8:24 ` kernel test robot 2021-10-10 8:24 ` kernel test robot 2021-10-16 14:34 ` [PATCH v11 1/4] HID: wacom_sys: Add support for flipping the data values Rob Herring 2021-10-16 14:34 ` Rob Herring [not found] ` <CAF8JNh+OUzvAHA9tBrH2d_WxWPXRgiunhGO5KV4-fqVG+tUOyQ@mail.gmail.com> 2021-10-18 21:54 ` Alistair Francis 2021-10-18 21:54 ` Alistair Francis 2021-10-19 1:50 ` Dmitry Torokhov 2021-10-19 1:50 ` Dmitry Torokhov 2021-10-19 22:57 ` Tobita, Tatsunosuke 2021-10-19 22:57 ` Tobita, Tatsunosuke 2021-10-19 23:33 ` Alistair Francis 2021-10-19 23:33 ` Alistair Francis 2021-10-20 1:05 ` Dmitry Torokhov 2021-10-20 1:05 ` Dmitry Torokhov 2021-10-20 1:44 ` Alistair Francis 2021-10-20 1:44 ` Alistair Francis 2021-10-20 2:14 ` Dmitry Torokhov 2021-10-20 2:14 ` Dmitry Torokhov 2021-10-20 7:40 ` Benjamin Tissoires 2021-10-20 7:40 ` Benjamin Tissoires 2021-10-20 11:34 ` Alistair Francis 2021-10-20 11:34 ` Alistair Francis 2021-10-20 12:04 ` Benjamin Tissoires 2021-10-20 12:04 ` Benjamin Tissoires 2021-10-21 9:27 ` Alistair Francis 2021-10-21 9:27 ` Alistair Francis 2021-10-20 11:28 ` Alistair Francis [this message] 2021-10-20 11:28 ` Alistair Francis 2021-10-20 11:46 ` Benjamin Tissoires 2021-10-20 11:46 ` Benjamin Tissoires
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='CAKmqyKMHoJWv=O0p_y6u34--njcsYxnWHg+EYzOFUnS3MFTvow@mail.gmail.com' \ --to=alistair23@gmail.com \ --cc=alistair@alistair23.me \ --cc=benjamin.tissoires@redhat.com \ --cc=devicetree@vger.kernel.org \ --cc=dmitry.torokhov@gmail.com \ --cc=jikos@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-input@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=pinglinux@gmail.com \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.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: linkBe 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.