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
7void rust_helper_regulator_put(struct regulator *regulator)
8{
9 regulator_put(regulator);
10}
11
12int 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
18int rust_helper_regulator_get_voltage(struct regulator *regulator)
19{
20 return regulator_get_voltage(regulator);
21}
22
23struct regulator *rust_helper_regulator_get(struct device *dev, const char *id)
24{
25 return regulator_get(dev, id);
26}
27
28int rust_helper_regulator_enable(struct regulator *regulator)
29{
30 return regulator_enable(regulator);
31}
32
33int rust_helper_regulator_disable(struct regulator *regulator)
34{
35 return regulator_disable(regulator);
36}
37
38int rust_helper_regulator_is_enabled(struct regulator *regulator)
39{
40 return regulator_is_enabled(regulator);
41}
42
43int rust_helper_devm_regulator_get_enable(struct device *dev, const char *id)
44{
45 return devm_regulator_get_enable(dev, id);
46}
47
48int rust_helper_devm_regulator_get_enable_optional(struct device *dev, const char *id)
49{
50 return devm_regulator_get_enable_optional(dev, id);
51}
52
53#endif