Commit 2e5e2919 authored by Devyn Liu's avatar Devyn Liu Committed by openeuler-sync-bot
Browse files

i2c: hisi: Optimized the value setting of maxwrite limit to fifo depth - 1

maillist inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I92EM3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git/commit/?h=i2c/i2c-host&id=69dc3880100288972fe341c2c59c40fdecf511f5



--------------------------------------

The driver finishes a write cycle by read the fifo tx full status
or write limit decrease to 0. The driver starts to write data to
the FIFO after the I2C FIFO almost empty interrupt is reported.
The threshold for FIFO almost empty interrupt is that the amount
of data in the FIFO is less than or equal to 1.
Reduce write maxwrite to the fifo depth - aempty interrupt
threshold. Limiting the number of data to be written at a time
to remaining fifo capacity.

Signed-off-by: default avatarDevyn Liu <liudingyuan@huawei.com>
Reviewed-by: default avatarYicong Yang <yangyicong@hisilicon.com>
Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
(cherry picked from commit 80c5f30a)
parent 8216cdc4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment