diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-16 18:16:45 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-18 09:43:10 +0100 |
commit | eb41e26aaad955ae72d3ac708725dcab165eb0ca (patch) | |
tree | c72795e9082bfa9ef8804ab67965482b2dc17d00 /include/regulator.h | |
parent | 851960f4e8c9554b93402fab072acf243386fe42 (diff) | |
download | barebox-eb41e26aaad955ae72d3ac708725dcab165eb0ca.tar.gz barebox-eb41e26aaad955ae72d3ac708725dcab165eb0ca.tar.xz |
regulator: Port basic regmap regulator functions
In order to be able to port Linux driver relying on this API, port
various regmap related regulator function to Barebox.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/regulator.h')
-rw-r--r-- | include/regulator.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/regulator.h b/include/regulator.h index 907073607f..1824e6ea14 100644 --- a/include/regulator.h +++ b/include/regulator.h @@ -6,10 +6,17 @@ struct regulator; struct regulator_desc { const struct regulator_ops *ops; + + unsigned int enable_reg; + unsigned int enable_mask; + unsigned int enable_val; + unsigned int disable_val; + bool enable_is_inverted; }; struct regulator_dev { const struct regulator_desc *desc; + struct regmap *regmap; int boot_on; }; @@ -39,7 +46,9 @@ void regulators_print(void); struct regulator *regulator_get(struct device_d *, const char *); int regulator_enable(struct regulator *); int regulator_disable(struct regulator *); - +int regulator_is_enabled_regmap(struct regulator_dev *); +int regulator_enable_regmap(struct regulator_dev *); +int regulator_disable_regmap(struct regulator_dev *); #else static inline struct regulator *regulator_get(struct device_d *dev, const char *id) |