1 From a71658c7db0b2be9fcab3522aeabe11792a4f481 Mon Sep 17 00:00:00 2001
2 From: Dmitry Osipenko <digetx@gmail.com>
3 Date: Wed, 20 Jan 2021 23:58:44 +0300
4 Subject: [PATCH] regulator: consumer: Add missing stubs to
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 commit 51dfb6ca3728bd0a0a3c23776a12d2a15a1d2457 upstream.
12 Add missing stubs to regulator/consumer.h in order to fix COMPILE_TEST
13 of the kernel. In particular this should fix compile-testing of OPP core
14 because of a missing stub for regulator_sync_voltage().
16 Reported-by: kernel test robot <lkp@intel.com>
17 Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
18 Link: https://lore.kernel.org/r/20210120205844.12658-1-digetx@gmail.com
19 Signed-off-by: Mark Brown <broonie@kernel.org>
20 Cc: Bjørn Mork <bjorn@mork.no>
21 Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24 include/linux/regulator/consumer.h | 30 ++++++++++++++++++++++++++++++
25 1 file changed, 30 insertions(+)
27 --- a/include/linux/regulator/consumer.h
28 +++ b/include/linux/regulator/consumer.h
29 @@ -332,6 +332,12 @@ regulator_get_exclusive(struct device *d
32 static inline struct regulator *__must_check
33 +devm_regulator_get_exclusive(struct device *dev, const char *id)
35 + return ERR_PTR(-ENODEV);
38 +static inline struct regulator *__must_check
39 regulator_get_optional(struct device *dev, const char *id)
41 return ERR_PTR(-ENODEV);
42 @@ -486,6 +492,11 @@ static inline int regulator_get_voltage(
46 +static inline int regulator_sync_voltage(struct regulator *regulator)
51 static inline int regulator_is_supported_voltage(struct regulator *regulator,
52 int min_uV, int max_uV)
54 @@ -578,6 +589,25 @@ static inline int devm_regulator_unregis
58 +static inline int regulator_suspend_enable(struct regulator_dev *rdev,
59 + suspend_state_t state)
64 +static inline int regulator_suspend_disable(struct regulator_dev *rdev,
65 + suspend_state_t state)
70 +static inline int regulator_set_suspend_voltage(struct regulator *regulator,
71 + int min_uV, int max_uV,
72 + suspend_state_t state)
77 static inline void *regulator_get_drvdata(struct regulator *regulator)