~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/mfd/wm831x-core.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1442
1442
        struct wm831x_pdata *pdata = wm831x->dev->platform_data;
1443
1443
        int rev;
1444
1444
        enum wm831x_parent parent;
1445
 
        int ret;
 
1445
        int ret, i;
1446
1446
 
1447
1447
        mutex_init(&wm831x->io_lock);
1448
1448
        mutex_init(&wm831x->key_lock);
1581
1581
                }
1582
1582
        }
1583
1583
 
 
1584
        if (pdata) {
 
1585
                for (i = 0; i < ARRAY_SIZE(pdata->gpio_defaults); i++) {
 
1586
                        if (!pdata->gpio_defaults[i])
 
1587
                                continue;
 
1588
 
 
1589
                        wm831x_reg_write(wm831x,
 
1590
                                         WM831X_GPIO1_CONTROL + i,
 
1591
                                         pdata->gpio_defaults[i] & 0xffff);
 
1592
                }
 
1593
        }
 
1594
 
1584
1595
        ret = wm831x_irq_init(wm831x, irq);
1585
1596
        if (ret != 0)
1586
1597
                goto err;