bus: mhi: ep: Add support for interrupt moderation timer
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 26 Oct 2023 04:55:13 +0000 (10:25 +0530)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 14 Dec 2023 06:28:49 +0000 (11:58 +0530)
commitcea4bcbf997ab2f6c8d242f41785b21ea91d53c3
tree2c4a2174bc0bc0dc7b105523391364dcd25ce010
parent62210a26cd4f8ad52683a71c0226dfe85de1144d
bus: mhi: ep: Add support for interrupt moderation timer

MHI spec defines the interrupt moderation timer feature using which the
host can limit the number of interrupts being raised for an event ring by
the device. This feature allows the host to process multiple event ring
elements by a single IRQ from the device, thereby eliminating the need to
process IRQ for each element.

The INTMODT field in the event context array provides the value to be used
for delaying the IRQ generation from device. This value, along with the
Block Event Interrupt (BEI) flag of the TRE defines how IRQ is generated to
the host.

Support for interrupt moderation timer is implemented using delayed
workqueue in kernel. And a separate delayed work item is used for each
event ring.

Link: https://lore.kernel.org/r/20231026045513.12981-1-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/ep/internal.h
drivers/bus/mhi/ep/main.c
drivers/bus/mhi/ep/ring.c