aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mcp-sa11x0.c
diff options
context:
space:
mode:
authorJochen Friedrich <jochen@scram.de>2011-11-27 16:00:54 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-08 18:37:33 -0500
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 02c53a0766c4..da4e077a1bee 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)
146 if (!data) 146 if (!data)
147 return -ENODEV; 147 return -ENODEV;
148 148
149 if (!data->codec)
150 return -ENODEV;
151
149 if (!request_mem_region(0x80060000, 0x60, "sa11x0-mcp")) 152 if (!request_mem_region(0x80060000, 0x60, "sa11x0-mcp"))
150 return -EBUSY; 153 return -EBUSY;
151 154
@@ -162,7 +165,7 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
162 mcp->dma_audio_wr = DMA_Ser4MCP0Wr; 165 mcp->dma_audio_wr = DMA_Ser4MCP0Wr;
163 mcp->dma_telco_rd = DMA_Ser4MCP1Rd; 166 mcp->dma_telco_rd = DMA_Ser4MCP1Rd;
164 mcp->dma_telco_wr = DMA_Ser4MCP1Wr; 167 mcp->dma_telco_wr = DMA_Ser4MCP1Wr;
165 mcp->gpio_base = data->gpio_base; 168 mcp->codec = data->codec;
166 169
167 platform_set_drvdata(pdev, mcp); 170 platform_set_drvdata(pdev, mcp);
168 171
@@ -195,7 +198,7 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
195 mcp->rw_timeout = (64 * 3 * 1000000 + mcp->sclk_rate - 1) / 198 mcp->rw_timeout = (64 * 3 * 1000000 + mcp->sclk_rate - 1) /
196 mcp->sclk_rate; 199 mcp->sclk_rate;
197 200
198 ret = mcp_host_register(mcp); 201 ret = mcp_host_register(mcp, data->codec_pdata);
199 if (ret == 0) 202 if (ret == 0)
200 goto out; 203 goto out;
201 204