This source file includes following definitions.
- regulator_coupler_register
- rdev_get_name
- regulator_check_consumers
- regulator_check_voltage
- regulator_get_voltage_rdev
- regulator_set_voltage_rdev
1
2
3
4
5
6
7
8 #ifndef __LINUX_REGULATOR_COUPLER_H_
9 #define __LINUX_REGULATOR_COUPLER_H_
10
11 #include <linux/kernel.h>
12 #include <linux/suspend.h>
13
14 struct regulator_coupler;
15 struct regulator_dev;
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 struct regulator_coupler {
42 struct list_head list;
43
44 int (*attach_regulator)(struct regulator_coupler *coupler,
45 struct regulator_dev *rdev);
46 int (*detach_regulator)(struct regulator_coupler *coupler,
47 struct regulator_dev *rdev);
48 int (*balance_voltage)(struct regulator_coupler *coupler,
49 struct regulator_dev *rdev,
50 suspend_state_t state);
51 };
52
53 #ifdef CONFIG_REGULATOR
54 int regulator_coupler_register(struct regulator_coupler *coupler);
55 const char *rdev_get_name(struct regulator_dev *rdev);
56 int regulator_check_consumers(struct regulator_dev *rdev,
57 int *min_uV, int *max_uV,
58 suspend_state_t state);
59 int regulator_check_voltage(struct regulator_dev *rdev,
60 int *min_uV, int *max_uV);
61 int regulator_get_voltage_rdev(struct regulator_dev *rdev);
62 int regulator_set_voltage_rdev(struct regulator_dev *rdev,
63 int min_uV, int max_uV,
64 suspend_state_t state);
65 #else
66 static inline int regulator_coupler_register(struct regulator_coupler *coupler)
67 {
68 return 0;
69 }
70 static inline const char *rdev_get_name(struct regulator_dev *rdev)
71 {
72 return NULL;
73 }
74 static inline int regulator_check_consumers(struct regulator_dev *rdev,
75 int *min_uV, int *max_uV,
76 suspend_state_t state)
77 {
78 return -EINVAL;
79 }
80 static inline int regulator_check_voltage(struct regulator_dev *rdev,
81 int *min_uV, int *max_uV)
82 {
83 return -EINVAL;
84 }
85 static inline int regulator_get_voltage_rdev(struct regulator_dev *rdev)
86 {
87 return -EINVAL;
88 }
89 static inline int regulator_set_voltage_rdev(struct regulator_dev *rdev,
90 int min_uV, int max_uV,
91 suspend_state_t state)
92 {
93 return -EINVAL;
94 }
95 #endif
96
97 #endif