]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: typec: add missing uevent when partner support PD
authorLinyu Yuan <quic_linyyuan@quicinc.com>
Fri, 1 Jul 2022 08:08:54 +0000 (16:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:20:18 +0000 (21:20 +0200)
commitf1e01a42dcbde7d210a1b0688e6a07b1bb6b45f7
treeec65a1c15100cb091817b64dacb4d07b2fa47164
parent61ab5d644e16f0e27d31c8e2d33cbf6f570c3714
usb: typec: add missing uevent when partner support PD

commit 6fb9e1d94789e8ee5a258a23bc588693f743fd6c upstream.

System like Android allow user control power role from UI, it is possible
to implement application base on typec uevent to refresh UI, but found
there is chance that UI show different state from typec attribute file.

In typec_set_pwr_opmode(), when partner support PD, there is no uevent
send to user space which cause the problem.

Fix it by sending uevent notification when change power mode to PD.

Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers")
Cc: stable@vger.kernel.org
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/1656662934-10226-1-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/class.c