diff options
Diffstat (limited to 'drivers/mfd/twl6040-core.c')
-rw-r--r-- | drivers/mfd/twl6040-core.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c index 3dca5c195a20..3f2a1cf02fc0 100644 --- a/drivers/mfd/twl6040-core.c +++ b/drivers/mfd/twl6040-core.c | |||
@@ -584,7 +584,7 @@ static int __devinit twl6040_probe(struct i2c_client *client, | |||
584 | goto irq_init_err; | 584 | goto irq_init_err; |
585 | 585 | ||
586 | ret = request_threaded_irq(twl6040->irq_base + TWL6040_IRQ_READY, | 586 | ret = request_threaded_irq(twl6040->irq_base + TWL6040_IRQ_READY, |
587 | NULL, twl6040_naudint_handler, 0, | 587 | NULL, twl6040_naudint_handler, IRQF_ONESHOT, |
588 | "twl6040_irq_ready", twl6040); | 588 | "twl6040_irq_ready", twl6040); |
589 | if (ret) { | 589 | if (ret) { |
590 | dev_err(twl6040->dev, "READY IRQ request failed: %d\n", | 590 | dev_err(twl6040->dev, "READY IRQ request failed: %d\n", |
@@ -631,6 +631,21 @@ static int __devinit twl6040_probe(struct i2c_client *client, | |||
631 | children++; | 631 | children++; |
632 | } | 632 | } |
633 | 633 | ||
634 | /* | ||
635 | * Enable the GPO driver in the following cases: | ||
636 | * DT booted kernel or legacy boot with valid gpo platform_data | ||
637 | */ | ||
638 | if (!pdata || (pdata && pdata->gpo)) { | ||
639 | cell = &twl6040->cells[children]; | ||
640 | cell->name = "twl6040-gpo"; | ||
641 | |||
642 | if (pdata) { | ||
643 | cell->platform_data = pdata->gpo; | ||
644 | cell->pdata_size = sizeof(*pdata->gpo); | ||
645 | } | ||
646 | children++; | ||
647 | } | ||
648 | |||
634 | ret = mfd_add_devices(&client->dev, -1, twl6040->cells, children, | 649 | ret = mfd_add_devices(&client->dev, -1, twl6040->cells, children, |
635 | NULL, 0, NULL); | 650 | NULL, 0, NULL); |
636 | if (ret) | 651 | if (ret) |