Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142011
b: refs/heads/master
c: 47c10ed
h: refs/heads/master
i:
  142009: 98babfe
  142007: 7c8ca3c
v: v3
  • Loading branch information
Philipp Zabel authored and Samuel Ortiz committed Apr 4, 2009
1 parent c3e292d commit 234c79d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d33ccbeecd8393cc690cf9a71008236cdd7cc2c
refs/heads/master: 47c10edd715d420cabd8622a4a458e9ac755b24d
22 changes: 13 additions & 9 deletions trunk/drivers/mfd/htc-pasic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,19 @@ static int __init pasic3_probe(struct platform_device *pdev)
/* calculate bus shift from mem resource */
asic->bus_shift = (resource_size(r) - 5) >> 3;

/* the first 5 PASIC3 registers control the DS1WM */
ds1wm_resources[0].end = (5 << asic->bus_shift) - 1;
ds1wm_cell.platform_data = &ds1wm_cell;
ds1wm_cell.data_size = sizeof(ds1wm_cell);
ret = mfd_add_devices(&pdev->dev, pdev->id, &ds1wm_cell, 1, r, irq);
if (ret < 0)
dev_warn(dev, "failed to register DS1WM\n");

if (pdata->led_pdata) {
if (pdata && pdata->clock_rate) {
ds1wm_pdata.clock_rate = pdata->clock_rate;
/* the first 5 PASIC3 registers control the DS1WM */
ds1wm_resources[0].end = (5 << asic->bus_shift) - 1;
ds1wm_cell.platform_data = &ds1wm_cell;
ds1wm_cell.data_size = sizeof(ds1wm_cell);
ret = mfd_add_devices(&pdev->dev, pdev->id,
&ds1wm_cell, 1, r, irq);
if (ret < 0)
dev_warn(dev, "failed to register DS1WM\n");
}

if (pdata && pdata->led_pdata) {
led_cell.driver_data = pdata->led_pdata;
led_cell.platform_data = &led_cell;
led_cell.data_size = sizeof(ds1wm_cell);
Expand Down

0 comments on commit 234c79d

Please sign in to comment.