From: Sungbo Eo <mans0n@gorani.run>
To: linux-mediatek@lists.infradead.org
Cc: Rob Herring <robh+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>, Bin Liu <b-liu@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Frank Wunderlich <frank-w@public-files.de>,
devicetree@vger.kernel.org, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Sungbo Eo <mans0n@gorani.run>
Subject: [PATCH v4 2/2] usb: musb: mediatek: Expose role-switch control to userspace
Date: Tue, 31 Aug 2021 00:59:03 +0900 [thread overview]
Message-ID: <20210830155903.13907-3-mans0n@gorani.run> (raw)
In-Reply-To: <20210830155903.13907-1-mans0n@gorani.run>
The allow_userspace_control flag enables manual role-switch from userspace.
Turn this feature on like several other USB DRD controller drivers.
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
---
drivers/usb/musb/mediatek.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.33.0
next prev parent reply other threads:[~2021-08-30 15:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 15:13 [PATCH 0/2] Add MUSB for MT7623 Sungbo Eo
2021-08-03 15:13 ` [PATCH 1/2] dt-bindings: usb: mtk-musb: add MT7623 compatible Sungbo Eo
2021-08-04 15:01 ` Matthias Brugger
2021-08-03 15:13 ` [PATCH 2/2] arm: dts: mt7623: add musb device nodes Sungbo Eo
2021-08-03 17:15 ` Aw: [PATCH 0/2] Add MUSB for MT7623 Frank Wunderlich
2021-08-04 0:14 ` Sungbo Eo
2021-08-04 8:11 ` Aw: " Frank Wunderlich
2021-08-05 1:34 ` Sungbo Eo
2021-08-04 11:33 ` Frank Wunderlich
2021-08-04 15:01 ` Matthias Brugger
2021-08-05 1:36 ` Sungbo Eo
2021-08-08 12:38 ` [PATCH v2 " Sungbo Eo
2021-08-08 12:38 ` [PATCH v2 1/2] dt-bindings: usb: mtk-musb: add MT7623 compatible Sungbo Eo
2021-08-13 20:49 ` Rob Herring
2021-08-08 12:38 ` [PATCH v2 2/2] arm: dts: mt7623: add musb device nodes Sungbo Eo
2021-08-13 20:48 ` Rob Herring
2021-08-22 4:13 ` [PATCH v3 0/1] Add MUSB for MT7623 Sungbo Eo
2021-08-22 4:13 ` [PATCH v3 1/1] arm: dts: mt7623: add musb device nodes Sungbo Eo
2021-08-30 15:17 ` Aw: " Frank Wunderlich
2021-08-30 15:59 ` [PATCH v4 0/2] Add MUSB for MT7623 Sungbo Eo
2021-08-30 15:59 ` [PATCH v4 1/2] arm: dts: mt7623: add musb device nodes Sungbo Eo
2021-08-31 6:27 ` Chunfeng Yun (云春峰)
2021-08-31 8:59 ` Frank Wunderlich
2021-08-31 11:02 ` Sungbo Eo
2021-08-31 11:08 ` Aw: " Frank Wunderlich
2021-09-20 10:48 ` Aw: " Frank Wunderlich
2021-09-20 12:01 ` Matthias Brugger
2021-08-30 15:59 ` Sungbo Eo [this message]
2021-08-31 6:15 ` [PATCH v4 2/2] usb: musb: mediatek: Expose role-switch control to userspace Chunfeng Yun (云春峰)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210830155903.13907-3-mans0n@gorani.run \
--to=mans0n@gorani.run \
--cc=b-liu@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=frank-w@public-files.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).