regmap: Add regmap_get_device
Add a new function regmap_get_device to obtain the underlying struct device from a regmap. Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:

committed by
Mark Brown

parent
7171511eae
commit
8d7d3972a9
@@ -1073,6 +1073,18 @@ struct regmap *dev_get_regmap(struct device *dev, const char *name)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dev_get_regmap);
|
||||
|
||||
/**
|
||||
* regmap_get_device(): Obtain the device from a regmap
|
||||
*
|
||||
* @map: Register map to operate on.
|
||||
*
|
||||
* Returns the underlying device that the regmap has been created for.
|
||||
*/
|
||||
struct device *regmap_get_device(struct regmap *map)
|
||||
{
|
||||
return map->dev;
|
||||
}
|
||||
|
||||
static int _regmap_select_page(struct regmap *map, unsigned int *reg,
|
||||
struct regmap_range_node *range,
|
||||
unsigned int val_num)
|
||||
|
Reference in New Issue
Block a user