diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:11:08 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:11:08 +0000 |
commit | e9e47386b37ce5ac666b830a23a8b2f34ae893ee (patch) | |
tree | 4ac4d06c2dda67b4d008eee94ef8f6aecf2c05be /drivers/mfd | |
parent | b33527d4cb37eb5e353d7bdf99775aad893fc4e9 (diff) |
fix-glamo-migrate-irq-init-before-register-init.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/glamo/glamo-core.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c index 287807a0d0c..91053e47729 100644 --- a/drivers/mfd/glamo/glamo-core.c +++ b/drivers/mfd/glamo/glamo-core.c @@ -1145,6 +1145,22 @@ static int __init glamo_probe(struct platform_device *pdev) goto out_free; } + for (irq = IRQ_GLAMO(0); irq <= IRQ_GLAMO(8); irq++) { + set_irq_chip(irq, &glamo_irq_chip); + set_irq_handler(irq, handle_level_irq); + set_irq_flags(irq, IRQF_VALID); + } + + if (glamo->pdata->glamo_irq_is_wired && + !glamo->pdata->glamo_irq_is_wired()) { + set_irq_chained_handler(glamo->irq, glamo_irq_demux_handler); + set_irq_type(glamo->irq, IRQT_FALLING); + dev_info(&pdev->dev, "Glamo interrupt registered\n"); + glamo->irq_works = 1; + } else { + dev_err(&pdev->dev, "Glamo interrupt not used\n"); + glamo->irq_works = 0; + } /* bring MCI specific stuff over from our MFD platform data */ glamo_mci_def_pdata.glamo_set_mci_power = glamo->pdata->glamo_set_mci_power; @@ -1227,20 +1243,6 @@ static int __init glamo_probe(struct platform_device *pdev) glamo_lcm_reset(1); - for (irq = IRQ_GLAMO(0); irq <= IRQ_GLAMO(8); irq++) { - set_irq_chip(irq, &glamo_irq_chip); - set_irq_handler(irq, handle_level_irq); - set_irq_flags(irq, IRQF_VALID); - } - - if (glamo->pdata->glamo_irq_is_wired && - !glamo->pdata->glamo_irq_is_wired()) { - set_irq_chained_handler(glamo->irq, glamo_irq_demux_handler); - set_irq_type(glamo->irq, IRQ_TYPE_EDGE_FALLING); - glamo->irq_works = 1; - } else - glamo->irq_works = 0; - return 0; out_free: |