summaryrefslogtreecommitdiff
path: root/sys/dev/usb/misc
AgeCommit message (Collapse)Author
2025-08-13gpio: remove gpiobus_attach_busAhmad Khalifa
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
2025-06-21newbus: replace leftover device unit wildcardsAhmad Khalifa
Reviewed by: imp, jhb Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D50913
2025-03-04usb: Kill left-over cdefs.h includesWarner Losh
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
2025-01-02Remove now-redundant calls to device_delete_childrenJohn Baldwin
Earlier calls to bus_generic_detach now take care of deleting children. Differential Revision: https://reviews.freebsd.org/D47962
2025-01-02Use the new bus_generic_detach directly in place of home-grown versionsJohn Baldwin
Differential Revision: https://reviews.freebsd.org/D47960
2024-12-06Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
2024-07-24newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh
Sponsored by: Netflix
2024-04-19Add support for i2c-tiny-usb: usb to iic bridgeDenis Bodor
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1123
2024-01-20usb: Fix two typos in source code commentsGordon Bergling
- s/bascially/basically/ - s/assistence/assistance/ MFC after: 3 days
2023-11-26sys: Automated cleanup of cdefs and other formattingWarner Losh
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
2023-10-27udbp: Remove stale splnet commentWarner Losh
netgraph no longer needs splnet. Document that we're forcing queueing. Sponsored by: Netflix
2023-08-16sys: Remove $FreeBSD$: one-line .c patternWarner Losh
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16sys: Remove $FreeBSD$: two-line .h patternWarner Losh
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2022-05-06usb: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin
2022-04-13usb: Use __diagused for variables only used in KASSERT().John Baldwin
2022-04-04cp2112iic_intr_write_callback: eliminate write only variable pscWarner Losh
Sponsored by: Netflix
2021-11-18Fix typo on "Celsius"Elyes HAOUAS
"Celcius" --> "Celsius" Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Pull Request: https://github.com/freebsd/freebsd-src/pull/551/files
2021-01-08hid: Chase for HID function name changes in existing USB HID driversVladimir Kondratyev
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)
2021-01-08Factor-out hardware-independent part of USB HID support to new moduleVladimir Kondratyev
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
2020-09-01usb: clean up empty lines in .c and .h filesMateusz Guzik
Notes: svn path=/head/; revision=365084
2020-08-20Remove the long obsolete ufm driver.Warner Losh
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
2020-08-12cp2112: a number of cleanups and improvementsAndriy Gapon
- 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
2020-08-06cp2112: driver for the namesake GPIO and I2C master gadgetAndriy Gapon
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
2020-04-01Start the retirement process for ufmWarner Losh
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
2020-02-15Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many)Pawel Biernacki
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
2019-12-04Regularize my copyright noticeWarner Losh
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
2017-11-27sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
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
2017-11-20sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
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
2017-10-22Add Prolific PL27A1 USB 3.0 Host-Host device to udbp(4).Bruce M Simpson
Tested with a Plugable cable in VirtualBox against Linux 4.11. MFC after: 2 weeks Notes: svn path=/head/; revision=324858
2017-03-31Add support for ThingM blink(1) notification LED to uled(4).Kevin Lo
Notes: svn path=/head/; revision=316326
2017-01-10Allow udbp(4) to claim Belkin "Windows Easy Transfer Cable" for Netgraph use.Bruce M Simpson
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
2016-05-02dev/usb: minor spelling fixes in comments.Pedro F. Giffuni
No functional change. Reviewed by: hselasky Notes: svn path=/head/; revision=298932
2015-12-11Create a USB_PNP_INFO and use it to export the existing PNPWarner Losh
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
2015-06-11Import ugold driver from OpenBSD supporting digital USB temperatureHans Petter Selasky
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
2015-01-06In order to reduce use of M_EXT outside of the mbuf allocator andRobert Watson
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
2015-01-05Make a bunch of USB debug SYSCTLs tunable, so that their value(s) canHans Petter Selasky
be set before the USB device(s) are probed. Notes: svn path=/head/; revision=276701
2014-09-16Fix some extra whitespace noticed when reviewing git diffs.Brooks Davis
Notes: svn path=/head/; revision=271680
2014-09-05The USB LED driver for the Dream Cheeky WebMail Notifier.Kevin Lo
Reviewed by: hselasky Notes: svn path=/head/; revision=271159
2013-04-03Add new USB ID.Hans Petter Selasky
MFC after: 1 week Submitted by: Bruce Simpson <bms@fastmail.net> Notes: svn path=/head/; revision=249039
2013-01-30Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez
device_method_t arrays Reviewed by: cognet Approved by: cognet Notes: svn path=/head/; revision=246128
2012-12-04Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff
malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
2012-04-02Fix compiler warnings, mostly signed issues,Hans Petter Selasky
when USB modules are compiled with WARNS=9. MFC after: 1 weeks Notes: svn path=/head/; revision=233774
2011-11-07Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.Ed Schouten
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
2011-06-24- Export more USB device ID's.Hans Petter Selasky
MFC after: 3 days Notes: svn path=/head/; revision=223515
2011-01-11Remove unneeded includes of <sys/linker_set.h>. Other headers that useJohn Baldwin
it internally contain nested includes. Reviewed by: bde Notes: svn path=/head/; revision=217265
2010-09-01Add missing MODULE_VERSION() definitions, this resolves problems aroundAndrew Thompson
duplicate module loads. PR: usb/125736 Submitted by: danger, mm Reviewed by: hselasky Notes: svn path=/head/; revision=212122
2010-04-22Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this hadAndrew Thompson
the illusion of a tunable setting but was always turned on regardless. MFC after: 1 week Notes: svn path=/head/; revision=207077
2009-08-24 - FIFO's are always opened separately in read and writeAlfred Perlstein
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
2009-06-23- Make struct usb_xfer opaque so that drivers can not access the internalsAndrew Thompson
- 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
2009-06-15s/usb2_/usb_|usbd_/ on all function names for the USB stack.Andrew Thompson
Notes: svn path=/head/; revision=194228