lkml.org 
[lkml]   [2010]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC][PATCH] input: Introduce device information ioctl
On Tue, Dec 7, 2010 at 13:40, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 07 December 2010, Kay Sievers wrote:
>> On Tue, Dec 7, 2010 at 10:16, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
>> > Hi Henrik,
>> >
>> > On Tue, Dec 07, 2010 at 08:25:26AM +0100, Henrik Rydberg wrote:
>> >> 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.
>> >
>> > If we agree that the new ioctl is suitable we'llalso need to wireit up
>> > through sysfs. Also, can we keep all definitions to INPUT_ namespace?
>>
>> Please don't add new ioctls which are not extensible. The ioctl should
>> carry the length or the version of the structure it asks for, so it
>> can be extended in the future. Sysfs should be good enough for such
>> interface though.
>
> Please never add any ioctls that have a version or length field!
>
> Ideally ioctls should have only scalar arguments, not structures,
> so I'd recommend splitting it into two, so you can read type and
> capability parameters separately.

Please don't add new ioctls with a single value only. :) That's what
sysfs is for, today.

The problem is that sysfs or ioctls with a single value can not handle
atomic queries of multiple values, and (rightfully) needing that in
some cases is a reason to add an ioctl() instead of sysfs.

Kay


\
 
 \ /
  Last update: 2010-12-07 13:53    [from the cache]
©2003-2011 Jasper Spaans