]> git.baikalelectronics.ru Git - kernel.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>
Fri, 8 Jul 2022 12:58:09 +0000 (14:58 +0200)
commit900ea3c70568b6b3b7ad8510b8d8e19de6f03ff8
tree4485bdb7042e7c4a85d2dbed47cecc7928c4041f
parent84fa18341bdba40506116f7500b2d9cc5f71b62a
usb: typec: add missing uevent when partner support PD

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: 07d98d55c664 ("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