* Re: spi-devel-general Digest, Vol 46, Issue 10
[not found] <mailman.59674.1267729564.5170.spi-devel-general@lists.sourceforge.net>
@ 2010-03-16 17:32 ` christian pellegrin
0 siblings, 0 replies; only message in thread
From: christian pellegrin @ 2010-03-16 17:32 UTC (permalink / raw)
To: Masakazu Mokuno, Feng Tang
Cc: Greg KH, David Brownell, linux-serial, spi-devel-list,
Andrew Morton, Alan Cox
Hi,
On Thu, Mar 4, 2010 at 8:06 PM,
<spi-devel-general-request@lists.sourceforge.net> wrote:
>> + if (use_irq) {
>> + ret = request_irq(max->irq, serial_m3110_irq,
>> + IRQ_TYPE_EDGE_FALLING, "max3110", max);
>
> According to the manufacturer's datasheet, it looks like MAX3110'irq is
> level interrupt. Refer Figure 6 of the datasheet.
>
It should work anyway if you are sure you clear the the condition that
generated the interrupt (so the interrupt line will have another
transition for sure). It's quite common when using deferred work
(worqueues for example) otherwise you have to turn irq off to avoid an
interrupt storm. Usually turning interrupts on and off is quite tricky
because they are counted.
>> + pmax = max;
>
> If this driver supports only one instance of devices, how about
> declaring a global struct uart_m3100 instead of kmallc()?
>
huh didn't noticed that it supports only one instance. I guess this is
very bad (my test machine for example has 2 MAX3100s, one for a GPS
receiver and one for a slow RS485 link).
--
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] only message in thread