summaryrefslogtreecommitdiff
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorSungbo Eo <mans0n@gorani.run>2021-08-31 00:59:03 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-14 11:55:22 +0200
commit7042b10141542f56e1b4179a228aefa8a5ac3fab (patch)
treedb811e47b0d9e4c8ca8fcef3685e36c62b810420 /drivers/usb/musb
parent6b0be25ca029469b5515119b96a6d684cf7d1e82 (diff)
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: Frank Wunderlich <frank-w@public-files.de> Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Sungbo Eo <mans0n@gorani.run> Link: https://lore.kernel.org/r/20210830155903.13907-3-mans0n@gorani.run Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/mediatek.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/musb/mediatek.c b/drivers/usb/musb/mediatek.c
index 6b92d037d8fc..f5d97eb84cb5 100644
--- a/drivers/usb/musb/mediatek.c
+++ b/drivers/usb/musb/mediatek.c
@@ -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);