Commit 03c87b95 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Mark Brown

regulator: provide rdev_get_regmap()

Provide a helper allowing to access regulator's regmap.
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6f3656f3
...@@ -5251,6 +5251,12 @@ struct device *rdev_get_dev(struct regulator_dev *rdev) ...@@ -5251,6 +5251,12 @@ struct device *rdev_get_dev(struct regulator_dev *rdev)
} }
EXPORT_SYMBOL_GPL(rdev_get_dev); EXPORT_SYMBOL_GPL(rdev_get_dev);
struct regmap *rdev_get_regmap(struct regulator_dev *rdev)
{
return rdev->regmap;
}
EXPORT_SYMBOL_GPL(rdev_get_regmap);
void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data) void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data)
{ {
return reg_init_data->driver_data; return reg_init_data->driver_data;
......
...@@ -503,6 +503,7 @@ int regulator_notifier_call_chain(struct regulator_dev *rdev, ...@@ -503,6 +503,7 @@ int regulator_notifier_call_chain(struct regulator_dev *rdev,
void *rdev_get_drvdata(struct regulator_dev *rdev); void *rdev_get_drvdata(struct regulator_dev *rdev);
struct device *rdev_get_dev(struct regulator_dev *rdev); struct device *rdev_get_dev(struct regulator_dev *rdev);
struct regmap *rdev_get_regmap(struct regulator_dev *rdev);
int rdev_get_id(struct regulator_dev *rdev); int rdev_get_id(struct regulator_dev *rdev);
int regulator_mode_to_status(unsigned int); int regulator_mode_to_status(unsigned int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment