summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-03-12 23:03:58 +0000
committerMark Brown <broonie@linaro.org>2014-03-12 23:03:58 +0000
commitda8ab21cfea80655a0f7bbbc3f2fa0975970b8cb (patch)
tree66d5a4804f0a15b5dc224bb2de9b0d9cb208eb91 /drivers
parentc6c124225f9551d78a19c291a2e204618f7e1e92 (diff)
parent5c1d5f091dc39eecf9a34a8be01492d14c23ad91 (diff)
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/regmap/regmap.c12
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)
}
EXPORT_SYMBOL_GPL(regmap_get_val_bytes);
+int regmap_parse_val(struct regmap *map, const void *buf,
+ unsigned int *val)
+{
+ if (!map->format.parse_val)
+ return -EINVAL;
+
+ *val = map->format.parse_val(buf);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(regmap_parse_val);
+
static int __init regmap_initcall(void)
{
regmap_debugfs_initcall();