Re: [PATCH 2/2] mrst_max3110: fix SPI UART interrupt parameters

From: Alexander Shiyan
Date: Tue Oct 22 2013 - 15:48:54 EST


> The change in the max3110 driver makes the IRQ handling threaded, now
> the handler is called only once per received character. Without that
> change, we had many (more than 100) interrupts per one received
> character.
>
> Unfortunately, SFI interface does not support IRQ polarity and
> triggering modes, so we have to keep the hacks as hard-coded device
> names and IRQ numbers until we switch to ACPI.
>
> Edge-triggered IRQ still supported to keep old platforms working.
> Use platform data to pass the irq mode argument.
>
> Signed-off-by: Ivan Gorinov <ivan.gorinov@xxxxxxxxx>
> Signed-off-by: Li Ning <ning.li@xxxxxxxxx>
> Signed-off-by: David Cohen <david.a.cohen@xxxxxxxxxxxxxxx>
...
> +++ b/include/linux/serial_max3110.h
> @@ -0,0 +1,16 @@
> +#ifndef _LINUX_SERIAL_MAX3110_H
> +#define _LINUX_SERIAL_MAX3110_H
> +
> +/**
> + * struct plat_max3110 - MAX3110 SPI UART platform data
> + * @irq_edge_trigger: if IRQ is edge triggered
> + *
> + * You should use this structure in your machine description to specify
> + * how the MAX3110 is connected.
> + *
> + */
> +struct plat_max3110 {
> + int irq_edge_triggered;
> +};
> +
> +#endif
> --

Is just resource->flags for IRQ can be reused for handle such case?

---
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i