Commit Graph
3 Commits
Author SHA1 Message Date
Gary Guo 2c5d17cdc4 rust: driver: remove open-coded matching logic
With device ID info now including pointers instead of indices, the
open-coded ACPI/OF matching is no longer needed and can be replaced with
`device_get_match_data`.

With the removal of open-coded matching, the exposed functions and helpers
are also removed; this effectively reverts most of commit 2690d07158
("rust: ACPI: fix missing match data for PRP0001").

Signed-off-by: Gary Guo <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Link: https://patch.msgid.link/[email protected]
[ Consider the serdev code merged in the meantime. - Danilo ]
Signed-off-by: Danilo Krummrich <[email protected]>
2026-07-30 22:50:15 +02:00
Gary Guo 0deeb4222d rust: driver: remove $module_table_name from module_device_table
Wrap the generated code in a `const _: ()` block to avoid symbol conflict.
This removes the need of creating a new identifier.

Signed-off-by: Gary Guo <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Link: https://patch.msgid.link/[email protected]
[ Consider the serdev code merged in the meantime. - Danilo ]
Signed-off-by: Danilo Krummrich <[email protected]>
2026-07-30 22:50:15 +02:00
Markus Probst 99f59aa823 rust: add basic serial device bus abstractions
Implement the basic serial device bus abstractions required to write a
serial device bus device driver with or without the need for initial device
data. This includes the following data structures:

The `serdev::Driver` trait represents the interface to the driver.

The `serdev::Device` abstraction represents a `struct serdev_device`.

In order to provide the Serdev specific parts to a generic
`driver::Registration` the `driver::RegistrationOps` trait is
implemented by `serdev::Adapter`.

Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Markus Probst <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Danilo Krummrich <[email protected]>
2026-07-23 22:48:24 +02:00