aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab8500-sysctrl.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2012-08-22 07:08:11 -0400
committerLee Jones <lee.jones@linaro.org>2013-03-06 23:28:45 -0500
commitc55355221e259bc4d6c1dc3ebe0852afce644a40 (patch)
treef76445f5452612be0eaac682614c404a57a5441f /drivers/mfd/ab8500-sysctrl.c
parent492390c8fd4a90b1e4ca371c8f8a23c63b04d7f9 (diff)
mfd: ab8500-sysctrl: AB8505 doesn't have SYSCLKREQ5..8
So we're removing support for it. Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/ab8500-sysctrl.c')
-rw-r--r--drivers/mfd/ab8500-sysctrl.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index f43c42b9f32c..272479cdb107 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -182,9 +182,9 @@ EXPORT_SYMBOL(ab8500_sysctrl_write);
182 182
183static int ab8500_sysctrl_probe(struct platform_device *pdev) 183static int ab8500_sysctrl_probe(struct platform_device *pdev)
184{ 184{
185 struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
185 struct ab8500_platform_data *plat; 186 struct ab8500_platform_data *plat;
186 struct ab8500_sysctrl_platform_data *pdata; 187 struct ab8500_sysctrl_platform_data *pdata;
187 int ret, i, j;
188 188
189 plat = dev_get_platdata(pdev->dev.parent); 189 plat = dev_get_platdata(pdev->dev.parent);
190 190
@@ -196,20 +196,27 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
196 196
197 pdata = plat->sysctrl; 197 pdata = plat->sysctrl;
198 198
199 199 if (pdata) {
200 for (i = AB8500_SYSCLKREQ1RFCLKBUF; 200 int last, ret, i, j;
201 i <= AB8500_SYSCLKREQ8RFCLKBUF; i++) { 201
202 j = i - AB8500_SYSCLKREQ1RFCLKBUF; 202 if (is_ab8505(ab8500))
203 ret = ab8500_sysctrl_write(i, 0xff, 203 last = AB8500_SYSCLKREQ4RFCLKBUF;
204 pdata->initial_req_buf_config[j]); 204 else
205 dev_dbg(&pdev->dev, 205 last = AB8500_SYSCLKREQ8RFCLKBUF;
206 "Setting SysClkReq%dRfClkBuf 0x%X\n", 206
207 j + 1, 207 for (i = AB8500_SYSCLKREQ1RFCLKBUF; i <= last; i++) {
208 pdata->initial_req_buf_config[j]); 208 j = i - AB8500_SYSCLKREQ1RFCLKBUF;
209 if (ret < 0) { 209 ret = ab8500_sysctrl_write(i, 0xff,
210 dev_err(&pdev->dev, 210 pdata->initial_req_buf_config[j]);
211 "unable to set sysClkReq%dRfClkBuf: " 211 dev_dbg(&pdev->dev,
212 "%d\n", j + 1, ret); 212 "Setting SysClkReq%dRfClkBuf 0x%X\n",
213 j + 1,
214 pdata->initial_req_buf_config[j]);
215 if (ret < 0) {
216 dev_err(&pdev->dev,
217 "unable to set sysClkReq%dRfClkBuf: "
218 "%d\n", j + 1, ret);
219 }
213 } 220 }
214 } 221 }
215 222