Thread (39 messages) 39 messages, 10 authors, 2024-09-20

Re: [PATCH 1/8] rust: kernel: Add Platform device and driver abstractions

flat view

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2024-09-11 14:56:17
Also in: linux-devicetree, lkml, rust-for-linux

On Wed, Sep 11, 2024 at 07:57:18PM +0530, Ayush Singh wrote:
quoted hunk ↗ jump to hunk
+/// An identifier for Platform devices.
+///
+/// Represents the kernel's [`struct of_device_id`]. This is used to find an appropriate
+/// Platform driver.
+///
+/// [`struct of_device_id`]: srctree/include/linux/mod_devicetable.h
+pub struct DeviceId(&'static CStr);
+
+impl DeviceId {
<snip>

I appreciate posting this, but this really should go on top of the
device driver work Danilo Krummrich has been doing.  He and I spent a
lot of time working through this this past weekend (well, him talking
and explaining, and me asking too many stupid questions...)

I think what he has will make the platform driver/device work simpler
here, and I'll be glad to take it based on that, this "independent" code
that doesn't interact with that isn't the best idea overall.

It also will properly handle the "Driver" interaction as well, which we
need to get right, not a one-off like this for a platform driver.
Hopefully that will not cause much, if any, changes for your use of this
in your driver, but let's see.

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help