There is currently no provision for passing IRQ trigger flags for
serial IRQs with triggering requirements (such as GPIO IRQs.)
This patch adds UPF-IRQ-TRIG-* flags which map on to IRQF-TRIGGER-*
flags.
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
-diff
+ /* Get IRQ Trigger Flag */
+ if (up->port.flags & UPF-IRQ-TRIG-RISING)
+ irq-flags |= IRQF-TRIGGER-RISING;
+ else if (up->port.flags & UPF-IRQ-TRIG-FALLING)
+ irq-flags |= IRQF-TRIGGER-FALLING;
+ else if (up->port.flags & UPF-IRQ-TRIG-HIGH)
+ irq-flags |= IRQF-TRIGGER-HIGH;
+ else if (up->port.flags & UPF-IRQ-TRIG-LOW)
+ irq-flags |= IRQF-TRIGGER-LOW;
+
mutex-lock(&hash-mutex);
h = &irq-lists[up->port.irq % NR-IRQ-HASH];
diff #define UPF-AUTO-IRQ (( #define UPF-BUGGY-UART ((
Re: PATCH - serial: 8250: add IRQ trigger support by Marc Zyngier on
2009-06-12T19:31:56+00:00
On Fri, 12 Jun 2009 12:32:51 -0500
Vikram Pandita <vikram.pandita@ti.com> wrote:
> There is currently no provision for passing IRQ trigger flags for
> serial IRQs with triggering requirements (such as GPIO IRQs.)
>
> This patch adds UPF-IRQ-TRIG-* flags which map on to IRQF-TRIGGER-*
> flags.
>
> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
> Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Note that this patch doesn't allow the interrupt to trigger on both
edges (not that I have ever seen a 8250 with this behavior, but this
is a valid configuration from an interrupt point of view).
Aside from this remark:
Acked-by: Marc Zyngier <maz@misterjones.org>
>
Re: PATCH - serial: 8250: add IRQ trigger support by Tony Lindgren on
2009-06-22T12:41:04+00:00
* Marc Zyngier <maz@misterjones.org> [090612 22:31]:
> On Fri, 12 Jun 2009 12:32:51 -0500
> Vikram Pandita <vikram.pandita@ti.com> wrote:
>
> > There is currently no provision for passing IRQ trigger flags for
> > serial IRQs with triggering requirements (such as GPIO IRQs.)
> >
> > This patch adds UPF-IRQ-TRIG-* flags which map on to IRQF-TRIGGER-*
> > flags.
> >
> > Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
> > Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
>
> Note that this patch doesn't allow the interrupt to trigger on both
> edges (not that I have ever seen a 8250 with this behavior, but this
> is a valid configuration from an interrupt point of view).
To me it sounds like the it would be better to have unsigned
long irqflags in struct uart-port instead of trying to squeeze
the irqflags the flags field. We're already not covering all the
irqflags currently like Marc pointed out.
Regards,
Tony
> Aside from this remark:
> Acked-by: Marc Zyngier <maz@misterjones.org>
>
> > > > > > + if (up->port.flags & UPF-IRQ-TRIG-RISING)
> > + irq-flags |= IRQF-TRIGGER-RISING;
> > + else if (up->port.flags & UPF-IRQ-TRIG-FALLING)
> > + irq-flags |= IRQF-TRIGGER-FALLING;
> > + else if (up->port.flags & UPF-IRQ-TRIG-HIGH)
> > + irq-flags |= IRQF-TRIGGER-HIGH;
> > + else if (up->port.flags & UPF-IRQ-TRIG-LOW)
> > + irq-flags |= IRQF-TRIGGER-LOW;
> > +
> > mutex-lock(&hash-mutex);
> >
> > h = &irq-lists[up->port.irq % NR-IRQ-HASH];
> > diff > > #define UPF-AUTO-IRQ ((> > #define UPF-BUGGY-UART ((> Please read the FAQ at http://www.tux.org/lkml/
Re: PATCH - serial: 8250: add IRQ trigger support by Alan Cox on
2009-06-22T13:23:17+00:00
> To me it sounds like the it would be better to have unsigned
> long irqflags in struct uart-port instead of trying to squeeze
> the irqflags the flags field. We're already not covering all the
> irqflags currently like Marc pointed out.
Agreed.
Alan
RE: PATCH - serial: 8250: add IRQ trigger support by Pandita, Vikram on
2009-06-22T13:25:51+00:00
>the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/