summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorKennet Wallden <kennet.wallden@stericsson.com>2011-09-27 09:23:56 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:01:07 +0200
commit672afbe5adffd7adcbd73456412c97cf32503023 (patch)
tree8587fb9674cd7a127b1050e27a57ac6dc062ad7c /drivers/mfd
parent868f676cb3f97454b121853666e5d1ac3974ed8d (diff)
u8500: Configure SysClkReqRfClkBuf
Added the possibility to configure SysCl1kReqRfClkBuf - SysClk8ReqRfClkBuf ST-Ericsson ID: 360052 ST-Ericsson Linux next: N/A ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I7813ae4a73701d874e39556c60608ff66e1d016d Signed-off-by: Kennet Wallden <kennet.wallden@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32261 Reviewed-by: Karl-Johan PERNTZ <karl-johan.perntz@stericsson.com> Reviewed-by: Bengt JONSSON <bengt.g.jonsson@stericsson.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ab8500-sysctrl.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index 2a328cfaf43..e6befdc9e08 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -154,12 +154,37 @@ int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value)
static int __devinit ab8500_sysctrl_probe(struct platform_device *pdev)
{
struct ab8500_platform_data *plat;
+ struct ab8500_sysctrl_platform_data *pdata;
sysctrl_dev = &pdev->dev;
plat = dev_get_platdata(pdev->dev.parent);
if (plat->pm_power_off)
pm_power_off = ab8500_power_off;
hwmon_notifier_register(&ab8500_notifier);
+
+ pdata = plat->sysctrl;
+
+ if (pdata) {
+ int ret;
+ int i;
+ int j;
+ for (i = AB8500_SYSCLKREQ1RFCLKBUF;
+ i <= AB8500_SYSCLKREQ8RFCLKBUF; i++) {
+ j = i - AB8500_SYSCLKREQ1RFCLKBUF;
+ ret = ab8500_sysctrl_write(i, 0xff,
+ pdata->initial_req_buf_config[j]);
+ dev_dbg(&pdev->dev,
+ "Setting SysClkReq%dRfClkBuf 0x%X\n",
+ j + 1,
+ pdata->initial_req_buf_config[j]);
+ if (ret < 0) {
+ dev_err(&pdev->dev,
+ "unable to set sysClkReq%dRfClkBuf: "
+ "%d\n", j + 1, ret);
+ }
+ }
+ }
+
return 0;
}