i2c: hisi: Add clearing tx aempty interrupt operation
authorDevyn Liu <liudingyuan@huawei.com>
Thu, 1 Feb 2024 06:13:45 +0000 (14:13 +0800)
committerAndi Shyti <andi.shyti@kernel.org>
Thu, 8 Feb 2024 08:34:19 +0000 (09:34 +0100)
commit9911be1d372946924b1fedaa1b96574920f35519
treedc56f148123a56e634b8383b94ee8dc5ea8e113f
parent5c015726a266b33227bc91a6926b3e93de834117
i2c: hisi: Add clearing tx aempty interrupt operation

The driver receives the tx fifo almost empty(aempty) interrupt and
reads the tx_aempty_int_mstat to start a round of data transfer.
The operation of clearing the TX aempty interrupt after completing
a write cycle is added to ensure that the FIFO is truly at almost
empty status when an aempty interrupt is received.
The threshold for fifo almost empty interrupt is defined as 1.

Signed-off-by: Devyn Liu <liudingyuan@huawei.com>
Reviewed-by: Yicong Yang <yangyicong@hisilicon.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-hisi.c