Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: GPL-2.0
2
3#include <linux/regulator/consumer.h>
4
5#ifndef CONFIG_REGULATOR
6
7__rust_helper void rust_helper_regulator_put(struct regulator *regulator)
8{
9 regulator_put(regulator);
10}
11
12__rust_helper int rust_helper_regulator_set_voltage(struct regulator *regulator,
13 int min_uV, int max_uV)
14{
15 return regulator_set_voltage(regulator, min_uV, max_uV);
16}
17
18__rust_helper int rust_helper_regulator_get_voltage(struct regulator *regulator)
19{
20 return regulator_get_voltage(regulator);
21}
22
23__rust_helper struct regulator *rust_helper_regulator_get(struct device *dev,
24 const char *id)
25{
26 return regulator_get(dev, id);
27}
28
29__rust_helper int rust_helper_regulator_enable(struct regulator *regulator)
30{
31 return regulator_enable(regulator);
32}
33
34__rust_helper int rust_helper_regulator_disable(struct regulator *regulator)
35{
36 return regulator_disable(regulator);
37}
38
39__rust_helper int rust_helper_regulator_is_enabled(struct regulator *regulator)
40{
41 return regulator_is_enabled(regulator);
42}
43
44__rust_helper int rust_helper_devm_regulator_get_enable(struct device *dev,
45 const char *id)
46{
47 return devm_regulator_get_enable(dev, id);
48}
49
50__rust_helper int
51rust_helper_devm_regulator_get_enable_optional(struct device *dev,
52 const char *id)
53{
54 return devm_regulator_get_enable_optional(dev, id);
55}
56
57#endif