linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] usb: cdns3: core: get role switch node from firmware
@ 2020-03-31  8:10 Peter Chen
  2020-03-31  8:10 ` [PATCH 2/4] usb: cdns3: delete role_override Peter Chen
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Peter Chen @ 2020-03-31  8:10 UTC (permalink / raw)
  To: balbi; +Cc: linux-usb, linux-imx, pawell, rogerq, gregkh, jun.li, Peter Chen

After that, the role switch device (eg, Type-C device) could call
cdns3_role_set to finish the role switch.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/usb/cdns3/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 4aafba20f450..704c679a0c5d 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -528,6 +528,8 @@ static int cdns3_probe(struct platform_device *pdev)
 	sw_desc.get = cdns3_role_get;
 	sw_desc.allow_userspace_control = true;
 	sw_desc.driver_data = cdns;
+	if (device_property_read_bool(dev, "usb-role-switch"))
+		sw_desc.fwnode = dev->fwnode;
 
 	cdns->role_sw = usb_role_switch_register(dev, &sw_desc);
 	if (IS_ERR(cdns->role_sw)) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-04-02 11:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31  8:10 [PATCH 1/4] usb: cdns3: core: get role switch node from firmware Peter Chen
2020-03-31  8:10 ` [PATCH 2/4] usb: cdns3: delete role_override Peter Chen
2020-03-31  8:10 ` [PATCH 3/4] usb: cdns3: change "cdsn3" to"cdns3" Peter Chen
2020-03-31  8:10 ` [PATCH 4/4] usb: cdns3: change dev_info to dev_dbg for debug message Peter Chen
2020-04-02  8:53 ` [PATCH 1/4] usb: cdns3: core: get role switch node from firmware Roger Quadros
2020-04-02  9:24   ` Peter Chen
2020-04-02  9:26     ` Roger Quadros
2020-04-02  9:37       ` Peter Chen
2020-04-02  9:45         ` Roger Quadros
2020-04-02 11:49 ` Roger Quadros

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).