Commit 7c55ce54 authored by Mark Featherston's avatar Mark Featherston Committed by Zheng Zengkai
Browse files

gpio: ts4900: Do not set DAT and OE together

stable inclusion
from stable-v5.10.106
commit 3a4cd1c51eea2e24d5ca5a312509138629c06171
bugzilla: https://gitee.com/openeuler/kernel/issues/I573US

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3a4cd1c51eea2e24d5ca5a312509138629c06171



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

[ Upstream commit 03fe0035 ]

This works around an issue with the hardware where both OE and
DAT are exposed in the same register. If both are updated
simultaneously, the harware makes no guarantees that OE or DAT
will actually change in any given order and may result in a
glitch of a few ns on a GPIO pin when changing direction and value
in a single write.

Setting direction to input now only affects OE bit. Setting
direction to output updates DAT first, then OE.

Fixes: 9c668632 ("gpio: add Technologic I2C-FPGA gpio support")
Signed-off-by: default avatarMark Featherston <mark@embeddedTS.com>
Signed-off-by: default avatarKris Bahnsen <kris@embeddedTS.com>
Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 0287e623
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment