drivers/usb/misc/onboard_usb_dev.c
Source file repositories/reference/linux-study-clean/drivers/usb/misc/onboard_usb_dev.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/misc/onboard_usb_dev.c- Extension
.c- Size
- 19378 bytes
- Lines
- 732
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/device.hlinux/export.hlinux/err.hlinux/gpio/consumer.hlinux/init.hlinux/i2c.hlinux/kernel.hlinux/list.hlinux/module.hlinux/mutex.hlinux/of.hlinux/of_platform.hlinux/platform_device.hlinux/regulator/consumer.hlinux/slab.hlinux/suspend.hlinux/sysfs.hlinux/usb.hlinux/usb/hcd.hlinux/usb/onboard_dev.hlinux/workqueue.honboard_usb_dev.h
Detected Declarations
struct usbdev_nodestruct onboard_devfunction onboard_dev_get_regulatorsfunction onboard_dev_power_onfunction onboard_dev_power_offfunction onboard_dev_suspendfunction list_for_each_entryfunction onboard_dev_resumefunction get_udev_link_namefunction onboard_dev_add_usbdevfunction onboard_dev_remove_usbdevfunction list_for_each_entryfunction always_powered_in_suspend_showfunction always_powered_in_suspend_storefunction onboard_dev_attrs_are_visiblefunction onboard_dev_attach_usb_driverfunction onboard_dev_5744_i2c_read_bytefunction onboard_dev_5744_i2c_write_bytefunction onboard_dev_5744_i2c_initfunction onboard_dev_5744_i2c_initfunction onboard_dev_probefunction onboard_dev_removefunction onboard_dev_usbdev_matchfunction onboard_dev_usbdev_probefunction onboard_dev_usbdev_disconnectfunction onboard_dev_initfunction onboard_dev_exitmodule init onboard_dev_init
Annotated Snippet
module_init(onboard_dev_init);
static void __exit onboard_dev_exit(void)
{
usb_deregister_device_driver(&onboard_dev_usbdev_driver);
platform_driver_unregister(&onboard_dev_driver);
cancel_work_sync(&attach_usb_driver_work);
}
module_exit(onboard_dev_exit);
MODULE_AUTHOR("Matthias Kaehlcke <mka@chromium.org>");
MODULE_DESCRIPTION("Driver for discrete onboard USB devices");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/clk.h`, `linux/device.h`, `linux/export.h`, `linux/err.h`, `linux/gpio/consumer.h`, `linux/init.h`, `linux/i2c.h`, `linux/kernel.h`.
- Detected declarations: `struct usbdev_node`, `struct onboard_dev`, `function onboard_dev_get_regulators`, `function onboard_dev_power_on`, `function onboard_dev_power_off`, `function onboard_dev_suspend`, `function list_for_each_entry`, `function onboard_dev_resume`, `function get_udev_link_name`, `function onboard_dev_add_usbdev`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.