aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/misc
Commit message (Collapse)AuthorAgeFilesLines
* gpio: remove gpiobus_attach_busAhmad Khalifa2025-08-131-2/+3
| | | | | | | | | | | | Since gpiobus_attach_bus can attach the gpiobus child along with its children in the same bus pass, the parent controller's reference to gpiobus might not be set by the time the children need it. Instead, drivers should use gpiobus_add_bus and explicitly call bus_attach_children. Reviewed by: mmel, imp (older version) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51578
* newbus: replace leftover device unit wildcardsAhmad Khalifa2025-06-211-1/+1
| | | | | | Reviewed by: imp, jhb Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D50913
* usb: Kill left-over cdefs.h includesWarner Losh2025-03-043-3/+0
| | | | | | | | | These includes were for __FBSD_RCSID() macro. They weren't formatted like the rest of the tree so weren't trimmed automatically when that script was run. Trim them now. MFC After: 1 week Sponsored by: Netflix
* Remove now-redundant calls to device_delete_childrenJohn Baldwin2025-01-022-2/+0
| | | | | | | Earlier calls to bus_generic_detach now take care of deleting children. Differential Revision: https://reviews.freebsd.org/D47962
* Use the new bus_generic_detach directly in place of home-grown versionsJohn Baldwin2025-01-021-15/+2
| | | | Differential Revision: https://reviews.freebsd.org/D47960
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-062-2/+2
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh2024-07-251-3/+3
| | | | Sponsored by: Netflix
* Add support for i2c-tiny-usb: usb to iic bridgeDenis Bodor2024-04-191-0/+302
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1123
* usb: Fix two typos in source code commentsGordon Bergling2024-01-201-1/+1
| | | | | | | - s/bascially/basically/ - s/assistence/assistance/ MFC after: 3 days
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* udbp: Remove stale splnet commentWarner Losh2023-10-271-1/+1
| | | | | | netgraph no longer needs splnet. Document that we're forcing queueing. Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-164-8/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* usb: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-064-18/+6
|
* usb: Use __diagused for variables only used in KASSERT().John Baldwin2022-04-131-3/+3
|
* cp2112iic_intr_write_callback: eliminate write only variable pscWarner Losh2022-04-051-2/+0
| | | | Sponsored by: Netflix
* Fix typo on "Celsius"Elyes HAOUAS2021-11-191-4/+4
| | | | | | | "Celcius" --> "Celsius" Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Pull Request: https://github.com/freebsd/freebsd-src/pull/551/files
* hid: Chase for HID function name changes in existing USB HID driversVladimir Kondratyev2021-01-071-1/+3
| | | | | | | | | | Also hide shim code added in a previous commit under COMPAT_USBHID12. Note: it is enough to add -DCOMPAT_USBHID12 to CFLAGS to compile old code with new HID subsystem, but it is not enough to link it at runtime. HID dependency has to be added explicitly with MODULE_DEPEND macro. Reviewed by: manu, hselasky (as part of D27887)
* Factor-out hardware-independent part of USB HID support to new moduleVladimir Kondratyev2021-01-071-0/+1
| | | | | | | | It will be used by the upcoming HID-over-i2C implementation. Should be no-op, except hid.ko module dependency is to be added to affected drivers. Reviewed by: hselasky, manu Differential revision: https://reviews.freebsd.org/D27867
* usb: clean up empty lines in .c and .h filesMateusz Guzik2020-09-014-13/+1
| | | | Notes: svn path=/head/; revision=365084
* Remove the long obsolete ufm driver.Warner Losh2020-08-201-340/+0
| | | | | | | | | | | | | It was a driver for a USB FM tuner that was available in the market in 2002. I wrote the driver in 2003. I've not used it since 2005 or so, so it's time to retire this driver. No userland code ever interfaced to the special device it created. There's no user base: the last bug I received on this driver was in 2004. Relnotes: Yes Notes: svn path=/head/; revision=364432
* cp2112: a number of cleanups and improvementsAndriy Gapon2020-08-121-301/+379
| | | | | | | | | | | | | | | | | | | | - hoist all request / response structures from function level to top level - replace magic numeric literals with constants - regroup types, data and functions - remove setting of the id field in responses as they are completely overwritten with data from the device - centralize setting of the id field as it is always set to the value of request type - fix setting and querying of open-drain vs push-pull configuration of an output pin -- it's always in one of those configurations - detect special pin configurations: a pin in a special configuration is neither general purpose input or output - there is still no support for setting special configurations MFC after: 2 weeks Notes: svn path=/head/; revision=364143
* cp2112: driver for the namesake GPIO and I2C master gadgetAndriy Gapon2020-08-061-0/+1381
| | | | | | | | | | | | | | | | | | | | | | | | | | Documentation: - CP2112 Datasheet https://www.silabs.com/documents/public/data-sheets/cp2112-datasheet.pdf - AN495: CP2112 Interface Specification https://www.silabs.com/documents/public/application-notes/an495-cp2112-interface-specification.pdf - CP2112 Errata https://www.silabs.com/documents/public/errata/cp2112-errata.pdf The logic is implemented as three sub-drivers. The parent driver claims the USB device and creates two child devices. One acts as a GPIO controller and the other is an I2C controller. Tested with CP2112 revision F02. Both features seem to work. HTU21 sensor was used as an I2C slave. Reviewed by: adrian, hselasky MFC after: 2 weeks Relnotes: maybe Differential Revision: https://reviews.freebsd.org/D25359 Notes: svn path=/head/; revision=363951
* Start the retirement process for ufmWarner Losh2020-04-011-0/+1
| | | | | | | | | | | | | | | This driver hasn't been relevant in almost 15 years. It was for a product on the shelves for about 6 months in 2003/2004. I've not updated the driver since then, and have had nobody talk to me about it since maybe 2006 or 2007. It doesn't implement a standard interface, and can be better done with libusb. All the action has moved to webcamd for newer, more fully featured hardware. It makes no appearances in the nycbug dmesg archive. Relnotes: yes MFC After: 3 days Notes: svn path=/head/; revision=359521
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many)Pawel Biernacki2020-02-152-2/+3
| | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Reviewed by: hselasky, kib Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D23632 Notes: svn path=/head/; revision=357972
* Regularize my copyright noticeWarner Losh2019-12-041-2/+1
| | | | | | | | | | | | o Remove All Rights Reserved from my notices o imp@FreeBSD.org everywhere o regularize punctiation, eliminate date ranges o Make sure that it's clear that I don't claim All Rights reserved by listing All Rights Reserved on same line as other copyright holders (but not me). Other such holders are also listed last where it's clear. Notes: svn path=/head/; revision=355394
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326022
* Add Prolific PL27A1 USB 3.0 Host-Host device to udbp(4).Bruce M Simpson2017-10-221-0/+1
| | | | | | | | | Tested with a Plugable cable in VirtualBox against Linux 4.11. MFC after: 2 weeks Notes: svn path=/head/; revision=324858
* Add support for ThingM blink(1) notification LED to uled(4).Kevin Lo2017-03-311-12/+32
| | | | Notes: svn path=/head/; revision=316326
* Allow udbp(4) to claim Belkin "Windows Easy Transfer Cable" for Netgraph use.Bruce M Simpson2017-01-101-0/+1
| | | | | | | | | These have been tested back-to-back with Linux 3.x and a similar attachment at the other end; a CDC EEM-like encapsulation can be used for emulated Ethernet over udbp(4) with ng_ether. Notes: svn path=/head/; revision=311847
* dev/usb: minor spelling fixes in comments.Pedro F. Giffuni2016-05-021-1/+1
| | | | | | | | | No functional change. Reviewed by: hselasky Notes: svn path=/head/; revision=298932
* Create a USB_PNP_INFO and use it to export the existing PNPWarner Losh2015-12-114-21/+25
| | | | | | | | | | | | | | tables. Some drivers needed some slight re-arrangement of declarations to accommodate this. Change the USB pnp tables slightly to allow better compatibility with the system by moving linux driver info from start of each entry to the end. All other PNP tables in the system have the per-device flags and such at the end of the elements rather that at the beginning. Differential Review: https://reviews.freebsd.org/D3458 Notes: svn path=/head/; revision=292080
* Import ugold driver from OpenBSD supporting digital USB temperatureHans Petter Selasky2015-06-111-0/+405
| | | | | | | | | | meters. The driver is currently not part of the default kernel build. Obtained from: OpenBSD MFC after: 2 weeks Notes: svn path=/head/; revision=284272
* In order to reduce use of M_EXT outside of the mbuf allocator andRobert Watson2015-01-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value. With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations. NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature. Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=276750
* Make a bunch of USB debug SYSCTLs tunable, so that their value(s) canHans Petter Selasky2015-01-051-1/+1
| | | | | | | be set before the USB device(s) are probed. Notes: svn path=/head/; revision=276701
* Fix some extra whitespace noticed when reviewing git diffs.Brooks Davis2014-09-161-1/+1
| | | | Notes: svn path=/head/; revision=271680
* The USB LED driver for the Dream Cheeky WebMail Notifier.Kevin Lo2014-09-051-0/+275
| | | | | | | Reviewed by: hselasky Notes: svn path=/head/; revision=271159
* Add new USB ID.Hans Petter Selasky2013-04-031-0/+1
| | | | | | | | MFC after: 1 week Submitted by: Bruce Simpson <bms@fastmail.net> Notes: svn path=/head/; revision=249039
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez2013-01-302-2/+4
| | | | | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet Notes: svn path=/head/; revision=246128
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-2/+2
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* Fix compiler warnings, mostly signed issues,Hans Petter Selasky2012-04-021-1/+1
| | | | | | | | | when USB modules are compiled with WARNS=9. MFC after: 1 weeks Notes: svn path=/head/; revision=233774
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.Ed Schouten2011-11-071-1/+1
| | | | | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static. Notes: svn path=/head/; revision=227309
* - Export more USB device ID's.Hans Petter Selasky2011-06-242-34/+25
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=223515
* Remove unneeded includes of <sys/linker_set.h>. Other headers that useJohn Baldwin2011-01-112-2/+0
| | | | | | | | | it internally contain nested includes. Reviewed by: bde Notes: svn path=/head/; revision=217265
* Add missing MODULE_VERSION() definitions, this resolves problems aroundAndrew Thompson2010-09-012-0/+2
| | | | | | | | | | | duplicate module loads. PR: usb/125736 Submitted by: danger, mm Reviewed by: hselasky Notes: svn path=/head/; revision=212122
* Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this hadAndrew Thompson2010-04-221-1/+1
| | | | | | | | | the illusion of a tunable setting but was always turned on regardless. MFC after: 1 week Notes: svn path=/head/; revision=207077
* - FIFO's are always opened separately in read and writeAlfred Perlstein2009-08-241-11/+4
| | | | | | | | | | | direction even if the actual device is opened for read and write. Fix fflags check so that the UFM and URIO drivers work. Reported by: Krassimir Slavchev Submitted by: hps Notes: svn path=/head/; revision=196490
* - Make struct usb_xfer opaque so that drivers can not access the internalsAndrew Thompson2009-06-232-43/+75
| | | | | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h Notes: svn path=/head/; revision=194677
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.Andrew Thompson2009-06-152-30/+30
| | | | Notes: svn path=/head/; revision=194228