aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/mcp-sa11x0.c
diff options
context:
space:
mode:
authorJochen Friedrich <jochen@scram.de>2011-11-27 22:00:54 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-09 00:37:33 +0100
commit5dd7bf59e0e8563265b3e5b33276099ef628fcc7 (patch)
tree1372dd626865e4ed21cac103a706f06ef6ff700e /drivers/mfd/mcp-sa11x0.c
parentc9531227b289947950cce29cfe881b768bf9d7d9 (diff)
ARM: sa11x0: Implement autoloading of codec and codec pdata for mcp bus.
Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/mcp-sa11x0.c')
-rw-r--r--drivers/mfd/mcp-sa11x0.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
index 02c53a0766c..da4e077a1be 100644
--- a/drivers/mfd/mcp-sa11x0.c
+++ b/drivers/mfd/mcp-sa11x0.c
@@ -146,6 +146,9 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
if (!data)
return -ENODEV;
+ if (!data->codec)
+ return -ENODEV;
+
if (!request_mem_region(0x80060000, 0x60, "sa11x0-mcp"))
return -EBUSY;
@@ -162,7 +165,7 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
mcp->dma_audio_wr = DMA_Ser4MCP0Wr;
mcp->dma_telco_rd = DMA_Ser4MCP1Rd;
mcp->dma_telco_wr = DMA_Ser4MCP1Wr;
- mcp->gpio_base = data->gpio_base;
+ mcp->codec = data->codec;
platform_set_drvdata(pdev, mcp);
@@ -195,7 +198,7 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
mcp->rw_timeout = (64 * 3 * 1000000 + mcp->sclk_rate - 1) /
mcp->sclk_rate;
- ret = mcp_host_register(mcp);
+ ret = mcp_host_register(mcp, data->codec_pdata);
if (ret == 0)
goto out;