Lines Matching refs:alt_port

220 	struct pmic_glink_altmode_port *alt_port = work_to_altmode_port(work);  in pmic_glink_altmode_worker()  local
221 struct pmic_glink_altmode *altmode = alt_port->altmode; in pmic_glink_altmode_worker()
223 typec_switch_set(alt_port->typec_switch, alt_port->orientation); in pmic_glink_altmode_worker()
225 if (alt_port->svid == USB_TYPEC_DP_SID && alt_port->mode == 0xff) in pmic_glink_altmode_worker()
226 pmic_glink_altmode_safe(altmode, alt_port); in pmic_glink_altmode_worker()
227 else if (alt_port->svid == USB_TYPEC_DP_SID) in pmic_glink_altmode_worker()
228 pmic_glink_altmode_enable_dp(altmode, alt_port, alt_port->mode, in pmic_glink_altmode_worker()
229 alt_port->hpd_state, alt_port->hpd_irq); in pmic_glink_altmode_worker()
231 pmic_glink_altmode_enable_usb(altmode, alt_port); in pmic_glink_altmode_worker()
233 if (alt_port->hpd_state) in pmic_glink_altmode_worker()
234 drm_bridge_hpd_notify(&alt_port->bridge, connector_status_connected); in pmic_glink_altmode_worker()
236 drm_bridge_hpd_notify(&alt_port->bridge, connector_status_disconnected); in pmic_glink_altmode_worker()
238 pmic_glink_altmode_request(altmode, ALTMODE_PAN_ACK, alt_port->index); in pmic_glink_altmode_worker()
261 struct pmic_glink_altmode_port *alt_port; in pmic_glink_altmode_sc8180xp_notify() local
293 alt_port = &altmode->ports[port]; in pmic_glink_altmode_sc8180xp_notify()
294 alt_port->orientation = pmic_glink_altmode_orientation(orientation); in pmic_glink_altmode_sc8180xp_notify()
295 alt_port->svid = svid; in pmic_glink_altmode_sc8180xp_notify()
296 alt_port->mode = mode; in pmic_glink_altmode_sc8180xp_notify()
297 alt_port->hpd_state = hpd_state; in pmic_glink_altmode_sc8180xp_notify()
298 alt_port->hpd_irq = hpd_irq; in pmic_glink_altmode_sc8180xp_notify()
299 schedule_work(&alt_port->work); in pmic_glink_altmode_sc8180xp_notify()
309 struct pmic_glink_altmode_port *alt_port; in pmic_glink_altmode_sc8280xp_notify() local
336 alt_port = &altmode->ports[port]; in pmic_glink_altmode_sc8280xp_notify()
337 alt_port->orientation = pmic_glink_altmode_orientation(orientation); in pmic_glink_altmode_sc8280xp_notify()
338 alt_port->svid = svid; in pmic_glink_altmode_sc8280xp_notify()
339 alt_port->mode = mode; in pmic_glink_altmode_sc8280xp_notify()
340 alt_port->hpd_state = hpd_state; in pmic_glink_altmode_sc8280xp_notify()
341 alt_port->hpd_irq = hpd_irq; in pmic_glink_altmode_sc8280xp_notify()
342 schedule_work(&alt_port->work); in pmic_glink_altmode_sc8280xp_notify()
419 struct pmic_glink_altmode_port *alt_port; in pmic_glink_altmode_probe() local
462 alt_port = &altmode->ports[port]; in pmic_glink_altmode_probe()
463 alt_port->altmode = altmode; in pmic_glink_altmode_probe()
464 alt_port->index = port; in pmic_glink_altmode_probe()
465 INIT_WORK(&alt_port->work, pmic_glink_altmode_worker); in pmic_glink_altmode_probe()
467 alt_port->bridge.funcs = &pmic_glink_altmode_bridge_funcs; in pmic_glink_altmode_probe()
468 alt_port->bridge.of_node = to_of_node(fwnode); in pmic_glink_altmode_probe()
469 alt_port->bridge.ops = DRM_BRIDGE_OP_HPD; in pmic_glink_altmode_probe()
470 alt_port->bridge.type = DRM_MODE_CONNECTOR_DisplayPort; in pmic_glink_altmode_probe()
472 ret = devm_drm_bridge_add(dev, &alt_port->bridge); in pmic_glink_altmode_probe()
478 alt_port->dp_alt.svid = USB_TYPEC_DP_SID; in pmic_glink_altmode_probe()
479 alt_port->dp_alt.mode = USB_TYPEC_DP_MODE; in pmic_glink_altmode_probe()
480 alt_port->dp_alt.active = 1; in pmic_glink_altmode_probe()
482 alt_port->typec_mux = fwnode_typec_mux_get(fwnode); in pmic_glink_altmode_probe()
483 if (IS_ERR(alt_port->typec_mux)) { in pmic_glink_altmode_probe()
485 return dev_err_probe(dev, PTR_ERR(alt_port->typec_mux), in pmic_glink_altmode_probe()
491 alt_port->typec_mux); in pmic_glink_altmode_probe()
497 alt_port->typec_retimer = fwnode_typec_retimer_get(fwnode); in pmic_glink_altmode_probe()
498 if (IS_ERR(alt_port->typec_retimer)) { in pmic_glink_altmode_probe()
500 return dev_err_probe(dev, PTR_ERR(alt_port->typec_retimer), in pmic_glink_altmode_probe()
506 alt_port->typec_retimer); in pmic_glink_altmode_probe()
512 alt_port->typec_switch = fwnode_typec_switch_get(fwnode); in pmic_glink_altmode_probe()
513 if (IS_ERR(alt_port->typec_switch)) { in pmic_glink_altmode_probe()
515 return dev_err_probe(dev, PTR_ERR(alt_port->typec_switch), in pmic_glink_altmode_probe()
521 alt_port->typec_switch); in pmic_glink_altmode_probe()