Re: [PATCH 0/2] rust: usb: add initial USB abstractions
From: Greg Kroah-Hartman
Date: Thu Sep 25 2025 - 08:53:18 EST
On Mon, Aug 25, 2025 at 03:18:04PM -0300, Daniel Almeida wrote:
> This adds initial support for USB Rust drivers, not only because I see a
> widespread use of module_usb_driver() in media (which is a subsystem I
> aim to support) but also because I want to learn about USB in general
> and this is a nice opportunity to start doing so.
>
> I tried to keep things as consistent with pci.rs and platform.rs as
> possible and tested it by manually binding a device (i.e.: my Logitech
> mouse) to the sample driver via:
>
> /sys/bus/usb/drivers/rust_driver_usb/new_id
>
> This initial patch is therefore comprised of the same patterns that are
> known to work for pci and platform already.
>
> Physically disconnecting the device also worked, i.e.: nothing bad
> showed up in dmesg.
>
> Note that I did not touch MAINTAINERS at all. The objective is to
> kickstart the discussion of what to do there here in v1.
Ok, as this seems to now be at least building properly for me, I have
taken it into my char-misc branch for the next -rc1 merge window.
BUT it has shown that it still needs some work to get "correct" and it
really doesn't do much quite yet, so I have applied the patch below to
pretty much just "disable" it entirely from the build at this point in
time.
I'll go and revert this commit after -rc1 is out, in my usb-next branch,
so that we can start to build on top of it and ensure that it doesn't
break, but for 6.18, I don't think it's quite ready to be there.
Yes, this is not a normal way that bindings will probably be merged into
the tree, but as I consulted deeply with the USB maintainer about this
topic while eating some good Paris pizza and French wine this week while
at the Kernel Recipes conference, I think that this deserves an
exception as they agree this can be merged now and they will be
responsible for any fallout.[1]
thanks,
greg k-h