From 921a2c870faa0a88c34e5c8c2afbd898fe8d325d Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 31 Aug 2013 14:08:56 +0100 Subject: mfd: davinci_voicecodec: Provide a regmap for register I/O This will be used to support refactoring of the ASoC CODEC driver to use a regmap. Signed-off-by: Mark Brown Signed-off-by: Samuel Ortiz --- drivers/mfd/davinci_voicecodec.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'drivers/mfd') diff --git a/drivers/mfd/davinci_voicecodec.c b/drivers/mfd/davinci_voicecodec.c index a292d71c397c..013ba8159dcd 100644 --- a/drivers/mfd/davinci_voicecodec.c +++ b/drivers/mfd/davinci_voicecodec.c @@ -27,11 +27,17 @@ #include #include #include +#include #include #include +static struct regmap_config davinci_vc_regmap = { + .reg_bits = 32, + .val_bits = 32, +}; + static int __init davinci_vc_probe(struct platform_device *pdev) { struct davinci_vc *davinci_vc; @@ -63,6 +69,14 @@ static int __init davinci_vc_probe(struct platform_device *pdev) goto fail; } + davinci_vc->regmap = devm_regmap_init_mmio(&pdev->dev, + davinci_vc->base, + &davinci_vc_regmap); + if (IS_ERR(davinci_vc->regmap)) { + ret = PTR_ERR(davinci_vc->regmap); + goto fail; + } + res = platform_get_resource(pdev, IORESOURCE_DMA, 0); if (!res) { dev_err(&pdev->dev, "no DMA resource\n"); -- cgit v1.2.3