Commit 0f2d7761 authored by Peter Chen's avatar Peter Chen Committed by Greg Kroah-Hartman

usb: cdns3: core: get role switch node from firmware

After that, the role switch device (eg, Type-C device) could call
cdns3_role_set to finish the role switch.
Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
Reviewed-by: default avatarRoger Quadros <rogerq@ti.com>
Link: https://lore.kernel.org/r/20200331081005.32752-1-peter.chen@nxp.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab455450
...@@ -528,6 +528,8 @@ static int cdns3_probe(struct platform_device *pdev) ...@@ -528,6 +528,8 @@ static int cdns3_probe(struct platform_device *pdev)
sw_desc.get = cdns3_role_get; sw_desc.get = cdns3_role_get;
sw_desc.allow_userspace_control = true; sw_desc.allow_userspace_control = true;
sw_desc.driver_data = cdns; 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); cdns->role_sw = usb_role_switch_register(dev, &sw_desc);
if (IS_ERR(cdns->role_sw)) { if (IS_ERR(cdns->role_sw)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment