Lines Matching full:role
30 #include <linux/usb/role.h>
158 * The below code to control the USB role-switch on devices with an AXP288
160 * to control the USB role-switch on such devices:
161 * 1) On many devices the USB role is controlled by AML code, but the AML code
166 * 2) In order for our BC1.2 charger detection to work properly the role
173 enum usb_role role; in axp288_get_id_pin() local
179 role = usb_role_switch_get_role(info->role_sw); in axp288_get_id_pin()
180 return role != USB_ROLE_HOST; in axp288_get_id_pin()
187 enum usb_role role; in axp288_usb_role_work() local
193 role = USB_ROLE_HOST; in axp288_usb_role_work()
195 role = USB_ROLE_DEVICE; in axp288_usb_role_work()
197 role = USB_ROLE_NONE; in axp288_usb_role_work()
199 ret = usb_role_switch_set_role(info->role_sw, role); in axp288_usb_role_work()
201 dev_err(info->dev, "failed to set role: %d\n", ret); in axp288_usb_role_work()
277 /* Setting the role can take a while */ in axp288_handle_chrg_det_event()
296 /* We may not sleep and setting the role can take a while */ in axp288_extcon_id_evt()
366 dev_info(dev, "controlling USB role\n"); in axp288_extcon_probe()
368 dev_info(dev, "controlling USB role based on Vbus presence\n"); in axp288_extcon_probe()
422 /* Make sure the role-sw is set correctly before doing BC detection */ in axp288_extcon_probe()
482 .endpoint[1] = "intel_xhci_usb_sw-role-switch",
483 .id = "usb-role-switch",