lkml.org 
[lkml]   [2010]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] input: Introduce device information ioctl
On Tue, Dec 07, 2010 at 08:22:22AM -0800, Greg KH wrote:
> On Tue, Dec 07, 2010 at 08:25:26AM +0100, Henrik Rydberg wrote:
> > /**
> > + * struct input_devinfo - device information via EVIOCGDEVINFO ioctl
> > + * @types: bitmask of types (DEVTYPE_*) matching this device
> > + * @capabilities: bitmask of capabilities (DEVCAPS_*) of this device
> > + *
> > + * This struct provides information about the device needed for
> > + * automatic setup in userspace, such as if the device is direct
> > + * (touchscreen) or indirect (touchpad), and if there are other
> > + * special considerations, such as the touchpad also being a button.
> > + */
> > +struct input_devinfo {
> > + __u32 types;
> > + __u32 capabilities;
> > +};
>
> Why use an ioctl for this at all? It's just 2 simple values that don't
> need to be atomically read at the same time. What's wrong with 2 more
> sysfs files?
>

Because if you already dealing with a file descriptor ioctl is much more
convenient. Sysfs can be nice (and that is why we'll add it as well) but
it is not a recipe for the world peace.

--
Dmitry


\
 
 \ /
  Last update: 2010-12-07 17:51    [W:0.382 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site