summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhid.c
AgeCommit message (Collapse)Author
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-04-15Modify the uhidev_*_report() methods to always take a report ID argumentMartin Pieuchot
instead of using the default, per-driver, one. This is a step to move away from the 1 report ID <-> 1 driver design which is no longer true since the addition of upd(4). ok andre@
2014-03-19Add a temporary hack to let a subdriver claim all the reportIDs ofMartin Pieuchot
a device. This should be removed once all the drivers attaching to uhidev(4) are converted. ok andre@, sthen@
2013-11-19Kill matchlvl usage throughout the usb stack.Paul Irofti
Allows us to move forward on cleaning. Okay mpi@
2013-11-15Clean-up the HID environment.Paul Irofti
This set of drivers were very very dirty. i/ Clean-up the match/attach multi-casting hackjob - stop casting aux to every attach arg in existance - be consistent about casting it only to uhidev_attach_arg - fetch the usb_attach_arg from above where needed ii/ Sort out the activate routines - leave the deactivation to the parent (uhidev(4)) - ditch the sc_dying flag in favour of usbd_is_dying() iii/ Get closer to keeping all the usb hid information in the uhidev structure (one uhidev per reportID) - store the usbd_device in the uhidev - use it consistently instead of always peaking at the parent's soft state Okay mpi@
2011-07-03Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thingMatthew Dempsky
that's ever used it, and it's long since been changed to use DVACT_{QUIESCE,SUSPEND,RESUME} instead. ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it up a few weeks ago
2011-07-02kqueue attach functions should return an errno or 0, not a plain 1. FixNicholas Marriott
the obvious cases to return EINVAL and ENXIO. ok tedu deraadt
2011-01-25garbage collect "usb events". without /dev/usb there is no way to accessJacob Meuser
them from userland, and nothing in the kernel uses them. ok krw@, miod@
2010-09-24remove dying flag in detach() function.Yojiro Uo
The dying flag will be set in activate()/DEACTIVATE. ok deraadt@
2010-08-02Handle USB_GET_REPORT, USB_GET_REPORT_DESC, USB_GET_REPORT_ID andMiod Vallat
USB_SET_REPORT ioctls in ukbd and ums. This allows usbhidctl to be used on these devices e.g. to dump the report descriptor of troublesome models. ok deraadt@
2010-07-26Correct the links between threads, processes, pgrps, and sessions,Philip Guenthe
so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
2009-11-23add USB_GET_DEVICEINFO and USB_GET_STRING_DESC ioctl to the uhid(4).Yojiro Uo
ok jsg@ deraadt@
2009-11-09Every selwakeup() should have a matching KNOTE() (even if kqueue isn'tNicholas Marriott
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and remove it from any occurences where both are used, except one for kqueue itself and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag). Based on a diff from tedu. ok deraadt
2009-10-31Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()Theo de Raadt
calls can go directly into selwakeup() safely long discussion with nicm, murmers of consent from tedu and miod, noone else seems to care of kqueue is busted as long as it makes their sockets move data fast... pretty sad.
2009-10-13Get rid of devact enum, substitute it with an int and coresponding defines.Paul Irofti
This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
2009-07-19clalloc() can't fail, so there's no need to handle failure cases.Bret Lambert
Change to void function. Also, no need to have global tty stats pointer, so just return it from clalloc, as the caller frees it immediately anyway. ok miod@
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2007-06-14Remove the definition and usage of the USB_DECLARE_DRIVER_CLASS andMarc Balmer
USB_DECLARE_DRIVER macros. No binary change. ok dlg.
2007-06-12Remove the definition and use of the device_ptr_t which was a struct device *.Marc Balmer
No binary change. ok mk.
2007-06-11Remove the usb_proc_ptr type definition, which was really a 'struct proc *'Marc Balmer
only. No binary change. ok mk.
2007-06-11Remove the USB_GET_SC_OPEN macro. There is a double check for sc == NULL inMarc Balmer
ulpt.c, I am aware of that and it will be changed later. No binary change. ok mk.
2007-06-11Remove the definition and use of the USB_GET_SC macro, no binary change.Marc Balmer
ok mk.
2007-06-11More USB cleanup: In usb_port.h, get rid of the sel_klist #defineMichael Knudsen
(which was there twice without gcc complaining) and update all uses of it. ok jsg mbalmer
2007-06-10Remove the definition and use of the USBDEV macro. It only created confusionMarc Balmer
and the address of it's argument: USBDEV(sc->sc_dev) yields &sc->sc_dev. No binary changes. ok jsg.
2007-06-05Remove the "Static" declaration of many functions. It was defined to be emptyMarc Balmer
and it was not consistently used. It was confusing as it suggested these functions were static, which they were not. discussed with dlg and jsg, ok jsg.
2007-06-04Last part of FreeBSD/NetBSD sepcific code removal.Marc Balmer
ok jsg@
2007-05-27Farewell USB_{ATTACH,MATCH,DETACH}* you will not be missed.Jonathan Gray
ok deraadt@ krw@ mbalmer@
2007-05-21Remove logprintf macroJonathan Gray
2006-11-01poll errors should be POLLERR, not some random E valueTed Unangst
from alexandre ratchov. ok claudio
2006-06-23In a drivers activate() entry point, if on DVACT_DEACTIVATE it doesMiod Vallat
something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP; this very popular bug has been cut and pasted a lot of times... ok deraadt@ mickey@
2005-11-21Move contents of sys/select.h to sys/selinfo.h in preparation for aTodd C. Miller
userland-visible sys/select.h. Consistent with what Net and Free do. OK deraadt@, tested with full ports build by naddy@.
2004-07-08put "do { } while (0)" wrappers on all the debug maroc functionsTheo de Raadt
2003-06-27kqueue support for various usb devices including: usb, uhid, ugen,Nathan Binkert
and uscanner From NetBSD
2003-05-19fix documentation links from netbsdNathan Binkert
2002-11-11sync with NetBSDNathan Binkert
2002-07-25update $NetBSD$ tagsNathan Binkert
2002-07-25get rid of trailing whitespaceNathan Binkert
2002-07-11Please be more portable in usb landNathan Binkert
2002-07-10no provate cdev_decl()s, they are in sys/conf.h nowMichael Shalayeff
2002-05-09Sync hid stuff including ukbd, ums, and uhid with NetBSDNathan Binkert
This adds a uhidev device which can be thought of as something like a uhid bus. It allows more than one ukbd, ums, or uhid to attach to the same device instance. This functionality is found on many of the newer keyboards that have extra buttons. (The extra buttons show up as uhid device(s)). Tested by me on i386, dale on macppc, and jason on sparc64
2002-05-07Meant to commit only ulpt and committed everything. Most things weren't readyNathan Binkert
2002-05-07Sync ulpt driver with NetBSDNathan Binkert
2002-05-02prefix structure members to avoid name clashes.Nathan Binkert
From NetBSD
2001-10-31Synchronize usb code with NetBSD.Nathan Binkert
2001-05-03Sync with NetBSD. Tested with a USB keyboard, USB mouse, and three differentAaron Campbell
kue(4) Ethernet devices.
2001-01-28Another USB sync with NetBSD. We are still lacking an up-to-date umass(4)Aaron Campbell
driver. I would appreciate it if someone with the hardware looked into it. I also have to take a closer look at changes to the USB Ethernet drivers, as well as import some drivers we are missing (uftdi, if_upl, yap, etc.)
2000-11-08Sync with NetBSD. Too many changes to mention. For now I have skippedAaron Campbell
umass.c and ukbd.c as the diffs are a bit hairier.
2000-07-04sync with NetBSD... well almost. someone w/ the hw should check umass.Federico G. Schwindt
2000-04-14Sync with NetBSD.Aaron Campbell
2000-03-30Sync with NetBSD. USB Ethernet drivers should work now.Aaron Campbell