linux/drivers/hid
David Herrmann d937ae5fae HID: uhid: implement read() on uhid devices
User-space can use read() to get a single event from uhid devices. read()
does never return multiple events. This allows us to extend the event
structure and still keep backwards compatibility.

If user-space wants to get multiple events in one syscall, they should use
the readv()/writev() syscalls which are supported by uhid.

This introduces a new lock which helps us synchronizing simultaneous reads
from user-space. We also correctly return -EINVAL/-EFAULT only on errors
and retry the read() when some other thread captured the event faster than
we did.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-06-18 13:42:00 +02:00
..
usbhid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2012-05-22 19:21:48 -07:00
hid-a4tech.c
hid-apple.c Merge branches 'upstream-fixes', 'wacom' and 'waltop' into for-linus 2012-05-22 11:35:11 +02:00
hid-aureal.c
hid-axff.c
hid-belkin.c
hid-cherry.c
hid-chicony.c
hid-core.c Merge branches 'upstream-fixes', 'wacom' and 'waltop' into for-linus 2012-05-22 11:35:11 +02:00
hid-cypress.c
hid-debug.c
hid-dr.c
hid-elecom.c
hid-emsff.c
hid-ezkey.c
hid-gaff.c
hid-generic.c HID: Create a common generic driver 2012-05-01 12:54:55 +02:00
hid-gyration.c
hid-holtekff.c
hid-hyperv.c HID: hyperv: Set the hid drvdata correctly 2012-05-17 10:01:07 +02:00
hid-ids.h Merge branches 'upstream-fixes', 'wacom' and 'waltop' into for-linus 2012-05-22 11:35:11 +02:00
hid-input.c Merge branches 'upstream-fixes', 'wacom' and 'waltop' into for-linus 2012-05-22 11:35:11 +02:00
hid-kensington.c
hid-keytouch.c
hid-kye.c
hid-lcpower.c
hid-lg.c
hid-lg.h
hid-lg2ff.c
hid-lg3ff.c
hid-lg4ff.c HID: hid-lg4ff: remove unused label in !LEDS_CLASS case 2012-04-23 21:08:15 +02:00
hid-lgff.c
hid-logitech-dj.c Merge branches 'upstream-fixes', 'wacom' and 'waltop' into for-linus 2012-05-22 11:35:11 +02:00
hid-logitech-dj.h
hid-magicmouse.c
hid-microsoft.c
hid-monterey.c
hid-multitouch.c HID: hid-multitouch: fix wrong protocol detection 2012-05-10 11:35:43 +02:00
hid-ntrig.c
hid-ortek.c
hid-petalynx.c
hid-picolcd.c
hid-pl.c
hid-primax.c
hid-prodikeys.c
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-kovaplus.c
hid-roccat-kovaplus.h
hid-roccat-pyra.c
hid-roccat-pyra.h
hid-roccat.c
hid-saitek.c
hid-samsung.c
hid-sjoy.c
hid-sony.c
hid-speedlink.c
hid-sunplus.c
hid-tivo.c
hid-tmff.c
hid-topseed.c
hid-twinhan.c
hid-uclogic.c HID: uclogic: Add support for UC-Logic TWHL850 2012-05-15 09:50:19 +02:00
hid-wacom.c HID: wacom: Unify speed setting 2012-05-16 21:42:16 +02:00
hid-waltop.c HID: waltop: Extend barrel button fix 2012-05-21 13:21:18 +02:00
hid-wiimote-core.c HID: wiimote: Fix IR data parser 2012-05-09 11:40:51 +02:00
hid-wiimote-debug.c
hid-wiimote-ext.c
hid-wiimote.h
hid-zpff.c
hid-zydacron.c
hidraw.c HID: hidraw: add proper error handling to raw event reporting 2012-04-27 20:10:09 +02:00
Kconfig HID: uhid: introduce user-space I/O driver support for HID 2012-06-18 13:41:59 +02:00
Makefile HID: uhid: introduce user-space I/O driver support for HID 2012-06-18 13:41:59 +02:00
uhid.c HID: uhid: implement read() on uhid devices 2012-06-18 13:42:00 +02:00