diff options
| author | 2025-08-25 15:18:05 -0300 | |
|---|---|---|
| committer | 2025-09-24 13:13:04 +0200 | |
| commit | e7e2296b0ecf9b6e934f7a1118cee91d4d486a84 (patch) | |
| tree | ac7fdb998ca906ed2fe030e550e2581651efbc90 /rust/helpers/usb.c | |
| parent | Merge tag 'coresight-next-v6.18-v2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next (diff) | |
| download | linux-rng-e7e2296b0ecf9b6e934f7a1118cee91d4d486a84.tar.xz linux-rng-e7e2296b0ecf9b6e934f7a1118cee91d4d486a84.zip | |
rust: usb: add basic USB abstractions
Add basic USB abstractions, consisting of usb::{Device, Interface,
Driver, Adapter, DeviceId} and the module_usb_driver macro. This is the
first step in being able to write USB device drivers, which paves the
way for USB media drivers - for example - among others.
This initial support will then be used by a subsequent sample driver,
which constitutes the only user of the USB abstractions so far.
Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://lore.kernel.org/r/20250825-b4-usb-v1-1-7aa024de7ae8@collabora.com
[ force USB = y for now - gregkh ]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/helpers/usb.c')
| -rw-r--r-- | rust/helpers/usb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/helpers/usb.c b/rust/helpers/usb.c new file mode 100644 index 000000000000..fb2aad0cbf4d --- /dev/null +++ b/rust/helpers/usb.c @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/usb.h> + +struct usb_device *rust_helper_interface_to_usbdev(struct usb_interface *intf) +{ + return interface_to_usbdev(intf); +} |
