Rust-for-Linux / linux

Adding support for the Rust language to the Linux kernel.
https://rust-for-linux.com
Other
3.83k stars 399 forks source link

rust: add regulator consumer abstraction #1040

Open Fabo opened 7 months ago

Fabo commented 7 months ago

I'm currently working on a driver that needs the regulator consumer abstraction. The driver that will use it is not yet ready but I thought I would push here the abstraction in case anyone needs it as well.

I do not consider the abstraction finished. I need to revise the documentation and do more testing.

The abstraction itself depends on https://lore.kernel.org/rust-for-linux/20230224-rust-iopt-rtkit-v1-0-49ced3391295@asahilina.net/ and is based on rust-dev (but could be rebased without issue on rust-next later on.

I also added a sample, but that one depends on a few things that I pulled from the rust branch such as OF, platform driver abstractions.