linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Adding BTN_TOOL_TOUCH to input.h
@ 2010-11-23 20:48 Ping Cheng
  2010-11-23 22:30 ` Dmitry Torokhov
  0 siblings, 1 reply; 30+ messages in thread
From: Ping Cheng @ 2010-11-23 20:48 UTC (permalink / raw)
  To: linux-input; +Cc: Dmitry Torokhov, Jiri Kosina

Hi all,

I am not going to write a patch for this request before I get the
permission for the new tool type. It affects all touch screen devices
(under drivers/input/touchscreen) that support both pen and touch.

Right now, in the user land, BTN_TOUCH is used to indicate a single
touch events. BTN_TOUCH and !BTN_TOOL_PEN
(http://udev.sourcearchive.com/documentation/161-1/input__id_8c-source.html)
are used to determine if the device is a touch screen device or not a
pen. With both pen and touch on the same logical port (serial touch
screen with pen and touch enabled, refer to wacom_w8001.c), BTN_TOUCH
and !BTN_TOOL_PEN will always be false, which indicates a
non-touchscreen device. That is wrong.

Unless we have other means to tell the user land a device is a
touchscreen, BTN_TOUCH with !BTN_TOOL_PEN won't do the job for us.

I've already had a value for the new type:

+#define BTN_TOOL_TOUCH       0x149

This new type resolves the confusion we had for the existing serial
pen and touch enabled touchscreen devices. Considering we are merging
the two logical ports for USB devices, the new type is required for
the future USB touchscreen support as well.

Thank you for reading and your timely comments would be greatly appreciated.

Ping

^ permalink raw reply	[flat|nested] 30+ messages in thread
* Re: [RFC] Adding BTN_TOOL_TOUCH to input.h
@ 2010-11-25 14:05 Henrik Rydberg
  2010-11-25 14:12 ` Nikolai Kondrashov
  2010-11-27  8:15 ` Dmitry Torokhov
  0 siblings, 2 replies; 30+ messages in thread
From: Henrik Rydberg @ 2010-11-25 14:05 UTC (permalink / raw)
  To: Chris Bagwell, Dmitry Torokhov; +Cc: Ping Cheng, linux-input, Jiri Kosina

Hi,

Reading through this thread, I think Dmitry's EVIOCGDEVTYPE is a great way to
resolve this. We should expect some changes in userland to correctly interpret
direct/indirect devices, and this seems a good way to go. The physical size of
the surface would also be great to retrieve this way. The recent resolution
addition is semantically odd, since we have only one physical surface, not one
per axes.

In short, my suggestion is to build a struct for device properties, like this:

struct input_devinfo {
	__u32	type;			/* bitmask of possible dev types */
	__u32	capabilities;		/* bitmask of special device caps */
	__u32	phys_abs_width;		/* physical width of surface (mm) */
	__u32	phys_abs_height;	/* physical height of surface (mm) */
};

Adding more stuff here seems plausible. For instance, special devices like
clickpads or integrated buttons would fit nicely in capabilities. The call would
be very similar, like

	ioctl(fd, EVIOCGDEVINFO, &info);

What do you think?

Cheers,
Henrik

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2010-12-07 17:05 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23 20:48 [RFC] Adding BTN_TOOL_TOUCH to input.h Ping Cheng
2010-11-23 22:30 ` Dmitry Torokhov
2010-11-23 22:40   ` Ping Cheng
2010-11-24  2:52     ` Dmitry Torokhov
2010-11-24  4:55       ` Chris Bagwell
2010-11-24 20:26         ` Dmitry Torokhov
2010-11-24 22:55           ` Chris Bagwell
2010-11-25  1:31             ` Dmitry Torokhov
2010-11-26 22:48               ` Chris Bagwell
2010-11-27  8:06                 ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2010-11-25 14:05 Henrik Rydberg
2010-11-25 14:12 ` Nikolai Kondrashov
2010-11-26 23:02   ` Chris Bagwell
2010-11-27  7:59     ` Dmitry Torokhov
2010-11-27  8:06     ` Nikolai Kondrashov
2010-11-27  8:32       ` Dmitry Torokhov
2010-11-27  8:51         ` Nikolai Kondrashov
     [not found]           ` <20101127091533.GA27213@core.coreip.homeip.net>
2010-11-27  9:46             ` Nikolai Kondrashov
2010-11-27 22:08               ` Chris Bagwell
2010-11-27 23:39               ` Dmitry Torokhov
2010-11-28  7:22                 ` Dmitry Torokhov
2010-11-28 14:57                   ` Nikolai Kondrashov
2010-11-28 21:47                     ` Dmitry Torokhov
2010-12-07 16:59                       ` Nikolai Kondrashov
2010-11-28  8:01                 ` Dmitry Torokhov
2010-11-28  8:28                   ` Henrik Rydberg
2010-11-28 10:14                   ` Nikolai Kondrashov
2010-11-27  8:15 ` Dmitry Torokhov
2010-11-27 17:04   ` Henrik Rydberg
2010-11-27 22:22     ` Chris Bagwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).