extcon: usbc-tusb320: Add support for TUSB320L
authorYassine Oudjana <y.oudjana@protonmail.com>
Sat, 25 Sep 2021 05:45:54 +0000 (05:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:28 +0000 (13:14 +0100)
commit31e9c2751035e82117d9d8a0eb876b184e3a5e97
tree93b1563c6b0b253ab6b10d60d07ff6a5931538bb
parentb9c8820d91e9b7e52b8513fe3e6be807ff79801e
extcon: usbc-tusb320: Add support for TUSB320L

[ Upstream commit ce0320bd3872038569be360870e2d5251b975692 ]

TUSB320L is a newer chip with additional features, and it has additional steps
in its mode changing sequence:
 - Disable CC state machine,
 - Write to mode register,
 - Wait for 5 ms,
 - Re-enable CC state machine.
It also has an additional register that a revision number can be read from.

Add support for the mode changing sequence, and read the revision number during
probe and print it as info.

Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Stable-dep-of: 581c848b610d ("extcon: usbc-tusb320: Update state on probe even if no IRQ pending")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/extcon/extcon-usbc-tusb320.c