mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
i2c: hisi: Avoid redundant interrupts
[ Upstream commit cc9812a309 ]
After issuing all the messages we can disable the TX_EMPTY interrupts
to avoid handling redundant interrupts. For doing a sinlge bus
detection (i2cdetect -y -r 0) we can reduce ~97% interrupts (before
~12000 after ~400).
Signed-off-by: Sheng Feng <fengsheng5@huawei.com>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d21a462120
commit
0f9d2fc588
@@ -315,6 +315,13 @@ static void hisi_i2c_xfer_msg(struct hisi_i2c_controller *ctlr)
|
||||
max_write == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Disable the TX_EMPTY interrupt after finishing all the messages to
|
||||
* avoid overwhelming the CPU.
|
||||
*/
|
||||
if (ctlr->msg_tx_idx == ctlr->msg_num)
|
||||
hisi_i2c_disable_int(ctlr, HISI_I2C_INT_TX_EMPTY);
|
||||
}
|
||||
|
||||
static irqreturn_t hisi_i2c_irq(int irq, void *context)
|
||||
|
||||
Reference in New Issue
Block a user