Re: [PATCH v7 1/2] rust: Add trait to convert a device reference to a bus device reference

From: Danilo Krummrich

Date: Mon Nov 17 2025 - 17:05:27 EST


On Tue Oct 28, 2025 at 9:06 AM NZDT, Markus Probst wrote:
> Implement the `AsBusDevice` trait for converting a `Device` reference to a
> bus device reference for all bus devices.
>
> The `AsBusDevice` trait allows abstractions to provide the bus device in
> class device callbacks. It must not be used by drivers and is intended for
> bus and class device abstractions only.
>
> Signed-off-by: Markus Probst <markus.probst@xxxxxxxxx>

Applied to driver-core-testing, thanks!

[ * Remove unused import.
* Change visibility of AsBusDevice to public.
* Fix build for USB.
* Add impl for I2cClient.
- Danilo ]

--

Given that it's already quite late in the cycle, I expect the LED stuff to land
in the next cycle, hence I picked this one up in the driver-core tree.

- Danilo