2017-07-22 22:59 GMT+02:00 Jonathan Cameron <jic23@xxxxxxxxxx>: >> + >> +/** >> + * irq_sim_fire - Enqueue an interrupt. >> + * >> + * @sim: The interrupt simulator object. >> + * @offset: Offset of the simulated interrupt which should be fired. >> + */ >> +void irq_sim_fire(struct irq_sim *sim, unsigned int offset) >> +{ >> + if (sim->irqs[offset].enabled) { >> + sim->work_ctx.irq = irq_sim_irqnum(sim, offset); > Is this safe against more than one firing at a time? Or is it > the responsibility of the caller to prevent that? > Yes, I assumed this should be the responsibility of the caller. Let me know if there's an important reason to implement separate locking within this framework. My goal was to keep it simple, hence no generalized UAPI too - callers should use their own interfaces to expose this to the user space if needed. Thanks, Bartosz -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html