Commit 7042b101 authored by Sungbo Eo's avatar Sungbo Eo Committed by Greg Kroah-Hartman
Browse files

usb: musb: mediatek: Expose role-switch control to userspace



The allow_userspace_control flag enables manual role-switch from userspace.
Turn this feature on like several other USB DRD controller drivers.

Tested-by: default avatarFrank Wunderlich <frank-w@public-files.de>
Acked-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: default avatarSungbo Eo <mans0n@gorani.run>
Link: https://lore.kernel.org/r/20210830155903.13907-3-mans0n@gorani.run


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6b0be25c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ static int mtk_otg_switch_init(struct mtk_glue *glue)

	role_sx_desc.set = musb_usb_role_sx_set;
	role_sx_desc.get = musb_usb_role_sx_get;
	role_sx_desc.allow_userspace_control = true;
	role_sx_desc.fwnode = dev_fwnode(glue->dev);
	role_sx_desc.driver_data = glue;
	glue->role_sw = usb_role_switch_register(glue->dev, &role_sx_desc);