Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Peter Chen <peter.chen@nxp.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Link: https://lore.kernel.org/r/20200331081005.32752-1-peter.chen@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Chen and committed by
Greg Kroah-Hartman
0f2d7761 ab455450

+2
+2
drivers/usb/cdns3/core.c
··· 528 528 sw_desc.get = cdns3_role_get; 529 529 sw_desc.allow_userspace_control = true; 530 530 sw_desc.driver_data = cdns; 531 + if (device_property_read_bool(dev, "usb-role-switch")) 532 + sw_desc.fwnode = dev->fwnode; 531 533 532 534 cdns->role_sw = usb_role_switch_register(dev, &sw_desc); 533 535 if (IS_ERR(cdns->role_sw)) {