Question about SPIs' interrupt trigger type restrictions
richard clark
richard.xnu.clark at gmail.com
Wed May 25 03:01:26 PDT 2022
Hi Marc,
For below code snippet about SPI interrupt trigger type:
static int gic_set_type(struct irq_data *d, unsigned int type)
{
...
/* SPIs have restrictions on the supported types */
if ((range == SPI_RANGE || range == ESPI_RANGE) &&
type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING)
return -EINVAL;
...
}
We have a device at hand whose interrupt type is SPI, Falling edge
will trigger the interrupt. But the request_irq(50, handler,
IRQ_TYPE_EDGE_FALLING, ...) will return -EINVAL.
The question is, why must the SPI interrupt use IRQ_TYPE_EDGE_RISING
instead of IRQ_TYPE_EDGE_FALLING?
Thanks,
More information about the linux-arm-kernel
mailing list