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:
parent
7171511eae
commit
8d7d3972a9
2 changed files with 19 additions and 0 deletions
|
@ -396,6 +396,7 @@ void regmap_exit(struct regmap *map);
|
|||
int regmap_reinit_cache(struct regmap *map,
|
||||
const struct regmap_config *config);
|
||||
struct regmap *dev_get_regmap(struct device *dev, const char *name);
|
||||
struct device *regmap_get_device(struct regmap *map);
|
||||
int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
|
||||
int regmap_write_async(struct regmap *map, unsigned int reg, unsigned int val);
|
||||
int regmap_raw_write(struct regmap *map, unsigned int reg,
|
||||
|
@ -729,6 +730,12 @@ static inline struct regmap *dev_get_regmap(struct device *dev,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct device *regmap_get_device(struct regmap *map)
|
||||
{
|
||||
WARN_ONCE(1, "regmap API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue