Lines Matching full:role
22 #include <linux/usb/role.h>
153 * The below code to control the USB role-switch on devices with an AXP288
155 * to control the USB role-switch on such devices:
156 * 1) On many devices the USB role is controlled by AML code, but the AML code
161 * 2) In order for our BC1.2 charger detection to work properly the role
168 enum usb_role role; in axp288_get_id_pin() local
174 role = usb_role_switch_get_role(info->role_sw); in axp288_get_id_pin()
175 return role != USB_ROLE_HOST; in axp288_get_id_pin()
182 enum usb_role role; in axp288_usb_role_work() local
188 role = USB_ROLE_HOST; in axp288_usb_role_work()
190 role = USB_ROLE_DEVICE; in axp288_usb_role_work()
192 role = USB_ROLE_NONE; in axp288_usb_role_work()
194 ret = usb_role_switch_set_role(info->role_sw, role); in axp288_usb_role_work()
196 dev_err(info->dev, "failed to set role: %d\n", ret); in axp288_usb_role_work()
278 /* Setting the role can take a while */ in axp288_handle_chrg_det_event()
299 /* We may not sleep and setting the role can take a while */ in axp288_extcon_id_evt()
400 dev_info(dev, "controlling USB role\n"); in axp288_extcon_probe()
402 dev_info(dev, "controlling USB role based on Vbus presence\n"); in axp288_extcon_probe()
462 /* Make sure the role-sw is set correctly before doing BC detection */ in axp288_extcon_probe()