Skip to content

Commit

Permalink
rust: regulator: add Regulator Driver abstraction
Browse files Browse the repository at this point in the history
This commit adds a Rust abstraction to write Regulator drivers. Only
the features used by the NCV6336 driver were added to this abstraction.

Signed-off-by: Fabien Parent <[email protected]>
  • Loading branch information
Fabo committed Oct 21, 2024
1 parent dfc9c6a commit 31a0a6b
Show file tree
Hide file tree
Showing 3 changed files with 752 additions and 0 deletions.
1 change: 1 addition & 0 deletions rust/bindings/bindings_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/refcount.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/regulator/driver.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/wait.h>
Expand Down
1 change: 1 addition & 0 deletions rust/kernel/regulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! SoC Regulators
pub mod consumer;
pub mod driver;

use crate::{
bindings,
Expand Down
Loading

0 comments on commit 31a0a6b

Please sign in to comment.