[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <25336.1291839964@localhost>
Date: Wed, 08 Dec 2010 15:26:04 -0500
From: Valdis.Kletnieks@...edu
To: Henrik Rydberg <rydberg@...omail.se>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Jiri Kosina <jkosina@...e.cz>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, Ping Cheng <pingc@...om.com>,
Chris Bagwell <chris@...bagwell.com>
Subject: Re: [RFC][PATCH] input: Introduce device information ioctl
On Tue, 07 Dec 2010 08:25:26 +0100, Henrik Rydberg said:
> Today, userspace sets up an input device based on the data it emits.
> This is not always enough; a tablet and a touchscreen may emit exactly
> the same data, for instance, but the former should be set up with a
> pointer whereas the latter does not need to. Recently, a new type of
> touchpad has emerged where the buttons are under the pad, which changes
> handling logic without changing the emitted data. This patch introduces
> a new ioctl, EVIOCGDEVINFO, which allows userspace to extract information
> about the device resulting in proper setup.
> /*
> + * Device types
> + */
> +
> +#define DEVTYPE_KEYBOARD 0
> +#define DEVTYPE_MOUSE 1
> +#define DEVTYPE_JOYSTICK 2
> +#define DEVTYPE_TOUCHPAD 3
> +#define DEVTYPE_TABLET 4
> +#define DEVTYPE_TOUCHSCREEN 5
Add a #define DEVTYPE_UNKNOWN 0 and push everybody else down one. That way,
an uninitialized 'struct input_devinfo' won't claim to be a keyboard.
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists