Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357624
b: refs/heads/master
c: 1abf063
h: refs/heads/master
v: v3
  • Loading branch information
Kennet Wallden authored and Lee Jones committed Feb 4, 2013
1 parent 533be69 commit c639b09
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0b32fa1e12a6fafbdf4fb142311a36f5314a6ff
refs/heads/master: 1abf063ffd18e6934bb81a776b3d71278eeff4ab
24 changes: 24 additions & 0 deletions trunk/drivers/mfd/ab8500-sysctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,35 @@ int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value)
static int 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;

pdata = plat->sysctrl;

if (pdata) {
int ret, i, 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;
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/mfd/abx500/ab8500-sysctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ static inline int ab8500_sysctrl_clear(u16 reg, u8 bits)
return ab8500_sysctrl_write(reg, bits, 0);
}

/* Configuration data for SysClkReq1RfClkBuf - SysClkReq8RfClkBuf */
struct ab8500_sysctrl_platform_data {
u8 initial_req_buf_config[8];
};

/* Registers */
#define AB8500_TURNONSTATUS 0x100
#define AB8500_RESETSTATUS 0x101
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mfd/abx500/ab8500.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ struct regulator_reg_init;
struct regulator_init_data;
struct ab8500_gpio_platform_data;
struct ab8500_codec_platform_data;
struct ab8500_sysctrl_platform_data;

/**
* struct ab8500_platform_data - AB8500 platform data
Expand All @@ -291,6 +292,7 @@ struct ab8500_platform_data {
struct regulator_init_data *regulator;
struct ab8500_gpio_platform_data *gpio;
struct ab8500_codec_platform_data *codec;
struct ab8500_sysctrl_platform_data *sysctrl;
};

extern int ab8500_init(struct ab8500 *ab8500,
Expand Down

0 comments on commit c639b09

Please sign in to comment.