usb: typec: intel_pmc_mux: enable sysfs usb role access
Subsystems (3)
PATCH v3 1/1 usb: typec: intel_pmc_mux: enable sysfs usb role access
The OS, such as ChromeOS, uses Android Runtime to run Android applications. This necessitates supporting tools, for example, Android Debugger (ADB). On host to host setup xHC.DbC shall support ADB with USB. This requires user space to control USB roles.
Enable user space control to modify the USB Type-C role. At run time it will create a role attribute in /sys/class/usb_role/<switch>/. Attribute can be modified based on the values suggested in the Documentation/ABI/testing/sysfs-class-usb_role.
Reviewed-by Andy Shevchenko <[email protected]>
Signed-off-by Uday M Bhat <[email protected]>
---
Changes from v1:
- Included Reviewed-by in commit message that was missed in v1 Changes from v2:
- Included missing change log
--- drivers/usb/typec/mux/intel_pmc_mux.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/typec/mux/intel_pmc_mux.c +1 -0
@@ -599,6 +599,7 @@ static int pmc_usb_register_port(struct pmc_usb *pmc, int index, desc.driver_data = port; desc.name =fwnode_get_name (fwnode); desc.set = pmc_usb_set_role; + desc.allow_userspace_control = true; port->usb_sw =usb_role_switch_register (pmc->dev, &desc);if (IS_ERR (port->usb_sw)) {
Signature · 1 line
2.17.1