[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <lyfxlhyvqu.fsf@ensc-virt.intern.sigma-chemnitz.de>
Date: Mon, 24 Nov 2008 16:44:09 +0100
From: Enrico Scholz <enrico.scholz@...ma-chemnitz.de>
To: linux-kernel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB/ISP1760: Add support for the generic platfrom device centralized driver model (v2)
Bryan Wu <cooloney@...nel.org>
writes:
> - isp1760 interrupt is default setup TRIGGER_LOW
> ...
> + irq = platform_get_irq(pdev, 0);
> ...
> + hcd = isp1760_register(addr->start, resource_size(addr), irq,
> + IRQF_DISABLED | IRQF_SHARED | IRQF_TRIGGER_LOW,
> + &pdev->dev, dev_name(&pdev->dev),
> + devflags);
TRIGGER_LOW default is bad on e.g. XScale platforms which have
edge triggered interrupts. It would be better to use the resource
flags for interrupt configuration. E.g.
----
struct resource *irq_res;
unsigned long flags;
irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
flags = ((irq_res->flags & IRQF_TRIGGER_MASK) |
((irq_res->flags & IORESOURCE_IRQ_SHAREABLE) ?
IRQF_SHARED : 0));
if ((irq_res->flags & (IORESOURCE_IRQ_HIGHEDGE|IORESOURCE_IRQ_LOWEDGE)))
dev_flags |= ISP1760_FLAG_INTR_EDGE_TRIG;
hcd = isp1760_register(addr->start, resource_size(addr), irq,
IRQF_DISABLED | flags,
&pdev->dev, dev_name(&pdev->dev),
devflags);
----
Enrico
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists