File tree Expand file tree Collapse file tree 6 files changed +465
-0
lines changed Expand file tree Collapse file tree 6 files changed +465
-0
lines changed Original file line number Diff line number Diff line change @@ -26561,6 +26561,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
26561
26561
F: Documentation/devicetree/bindings/regulator/
26562
26562
F: Documentation/power/regulator/
26563
26563
F: drivers/regulator/
26564
+ F: rust/kernel/regulator.rs
26564
26565
F: include/dt-bindings/regulator/
26565
26566
F: include/linux/regulator/
26566
26567
K: regulator_get_optional
Original file line number Diff line number Diff line change 65
65
#include <linux/poll.h>
66
66
#include <linux/property.h>
67
67
#include <linux/refcount.h>
68
+ #include <linux/regulator/consumer.h>
68
69
#include <linux/sched.h>
69
70
#include <linux/security.h>
70
71
#include <linux/slab.h>
Original file line number Diff line number Diff line change 33
33
#include "pci.c"
34
34
#include "pid_namespace.c"
35
35
#include "rbtree.c"
36
+ #include "regulator.c"
36
37
#include "rcu.c"
37
38
#include "refcount.c"
38
39
#include "security.c"
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: GPL-2.0
2
+
3
+ #include <linux/regulator/consumer.h>
4
+
5
+ #ifndef CONFIG_REGULATOR
6
+
7
+ void rust_helper_regulator_put (struct regulator * regulator )
8
+ {
9
+ regulator_put (regulator );
10
+ }
11
+
12
+ int rust_helper_regulator_set_voltage (struct regulator * regulator , int min_uV ,
13
+ int max_uV )
14
+ {
15
+ return regulator_set_voltage (regulator , min_uV , max_uV );
16
+ }
17
+
18
+ int rust_helper_regulator_get_voltage (struct regulator * regulator )
19
+ {
20
+ return regulator_get_voltage (regulator );
21
+ }
22
+
23
+ struct regulator * rust_helper_regulator_get (struct device * dev , const char * id )
24
+ {
25
+ return regulator_get (dev , id );
26
+ }
27
+
28
+ int rust_helper_regulator_enable (struct regulator * regulator )
29
+ {
30
+ return regulator_enable (regulator );
31
+ }
32
+
33
+ int rust_helper_regulator_disable (struct regulator * regulator )
34
+ {
35
+ return regulator_disable (regulator );
36
+ }
37
+
38
+ int rust_helper_regulator_is_enabled (struct regulator * regulator )
39
+ {
40
+ return regulator_is_enabled (regulator );
41
+ }
42
+
43
+ #endif
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ pub mod platform;
100
100
pub mod prelude;
101
101
pub mod print;
102
102
pub mod rbtree;
103
+ pub mod regulator;
103
104
pub mod revocable;
104
105
pub mod security;
105
106
pub mod seq_file;
You can’t perform that action at this time.
0 commit comments