mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
6a01766076
commit
921a2c870f
2 changed files with 17 additions and 0 deletions
|
|
@ -27,11 +27,17 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include <sound/pcm.h>
|
||||
|
||||
#include <linux/mfd/davinci_voicecodec.h>
|
||||
|
||||
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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue