diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 6a19515f8a45..4b2ed0c9e80d 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c | |||
@@ -2240,6 +2240,18 @@ int regmap_get_val_bytes(struct regmap *map) | |||
2240 | } | 2240 | } |
2241 | EXPORT_SYMBOL_GPL(regmap_get_val_bytes); | 2241 | EXPORT_SYMBOL_GPL(regmap_get_val_bytes); |
2242 | 2242 | ||
2243 | int regmap_parse_val(struct regmap *map, const void *buf, | ||
2244 | unsigned int *val) | ||
2245 | { | ||
2246 | if (!map->format.parse_val) | ||
2247 | return -EINVAL; | ||
2248 | |||
2249 | *val = map->format.parse_val(buf); | ||
2250 | |||
2251 | return 0; | ||
2252 | } | ||
2253 | EXPORT_SYMBOL_GPL(regmap_parse_val); | ||
2254 | |||
2243 | static int __init regmap_initcall(void) | 2255 | static int __init regmap_initcall(void) |
2244 | { | 2256 | { |
2245 | regmap_debugfs_initcall(); | 2257 | regmap_debugfs_initcall(); |