Thread (8 messages) 8 messages, 5 authors, 2012-04-03

Re: [RFC v2 1/1] HID: User-space I/O driver support for HID subsystem

From: Nicolas Pouillon <hidden>
Date: 2012-03-28 11:15:31
Also in: linux-input

David,

----- Original Message -----
quoted
quoted
+ =C2=A0 =C2=A0 strncpy(hid->name, ev->u.create.name, 128);
+ =C2=A0 =C2=A0 hid->name[127] =3D 0;
+ =C2=A0 =C2=A0 hid->ll_driver =3D &uhid_hid_driver;
+ =C2=A0 =C2=A0 hid->hid_get_raw_report =3D uhid_hid_get_raw;
+ =C2=A0 =C2=A0 hid->hid_output_raw_report =3D uhid_hid_output_raw;
+ =C2=A0 =C2=A0 hid->bus =3D ev->u.create.bus;
+ =C2=A0 =C2=A0 hid->vendor =3D ev->u.create.vendor;
+ =C2=A0 =C2=A0 hid->product =3D ev->u.create.product;
+ =C2=A0 =C2=A0 hid->version =3D ev->u.create.version;
+ =C2=A0 =C2=A0 hid->country =3D ev->u.create.country;
+ =C2=A0 =C2=A0 hid->phys[0] =3D 0;
+ =C2=A0 =C2=A0 hid->uniq[0] =3D 0;
+ =C2=A0 =C2=A0 hid->driver_data =3D uhid;
+ =C2=A0 =C2=A0 hid->dev.parent =3D uhid->parent;
Here we have to make sure that we have all required information provide=
d
quoted
by userspace. Anything else that HID might require to work better. Or
that BR/EDR or LE provides additionally over USB.
=20
Beside phys and uniq I have copied all information that HIDP and
USBHID use. I haven't found any other field that could be of interest
here. We can also always add UHID_CREATE2 with additional fields to
allow further additions (or use a "size" field as you suggested
below).
HID report descriptor may reference Physical Descriptor (HID 6.2.3) and
String Descriptor entries (USB 9.6.8, HID E.11).  Physical Descriptor
blob could be another __user buffer + size in uhid_create_req.  String
descriptor should probably be an event for querying strings.

hidraw interface also offers access to Feature Reports, adding events
to send/receive and query (kernel querying uhid client) feature reports
could be of some interest.

Cheers,
--=20
Nicolas Pouillon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help