Home
last modified time | relevance | path

Searched refs:altmode (Results 1 – 7 of 7) sorted by relevance

/Linux-v5.15/include/linux/usb/
Dtypec_altmode.h37 static inline void typec_altmode_set_drvdata(struct typec_altmode *altmode, in typec_altmode_set_drvdata() argument
40 dev_set_drvdata(&altmode->dev, data); in typec_altmode_set_drvdata()
43 static inline void *typec_altmode_get_drvdata(struct typec_altmode *altmode) in typec_altmode_get_drvdata() argument
45 return dev_get_drvdata(&altmode->dev); in typec_altmode_get_drvdata()
58 int (*enter)(struct typec_altmode *altmode, u32 *vdo);
59 int (*exit)(struct typec_altmode *altmode);
60 void (*attention)(struct typec_altmode *altmode, u32 vdo);
61 int (*vdm)(struct typec_altmode *altmode, const u32 hdr,
63 int (*notify)(struct typec_altmode *altmode, unsigned long conf,
65 int (*activate)(struct typec_altmode *altmode, int activate);
[all …]
Dtypec.h147 void typec_unregister_altmode(struct typec_altmode *altmode);
/Linux-v5.15/drivers/usb/typec/
Dbus.c16 typec_altmode_set_mux(struct altmode *alt, unsigned long conf, void *data) in typec_altmode_set_mux()
34 struct altmode *port_altmode; in typec_altmode_set_state()
61 struct altmode *altmode; in typec_altmode_notify() local
62 struct altmode *partner; in typec_altmode_notify()
68 altmode = to_altmode(adev); in typec_altmode_notify()
70 if (!altmode->partner) in typec_altmode_notify()
74 partner = altmode->partner; in typec_altmode_notify()
76 ret = typec_altmode_set_mux(is_port ? altmode : partner, conf, data); in typec_altmode_notify()
99 struct altmode *partner = to_altmode(adev)->partner; in typec_altmode_enter()
130 struct altmode *partner = to_altmode(adev)->partner; in typec_altmode_exit()
[all …]
Dbus.h11 struct altmode { struct
23 struct altmode *partner; argument
24 struct altmode *plug[2]; argument
27 #define to_altmode(d) container_of(d, struct altmode, adev)
Dclass.c234 static void typec_altmode_set_partner(struct altmode *altmode) in typec_altmode_set_partner() argument
236 struct typec_altmode *adev = &altmode->adev; in typec_altmode_set_partner()
239 struct altmode *partner; in typec_altmode_set_partner()
248 altmode->partner = partner; in typec_altmode_set_partner()
254 partner->plug[plug->index] = altmode; in typec_altmode_set_partner()
256 partner->partner = altmode; in typec_altmode_set_partner()
260 static void typec_altmode_put_partner(struct altmode *altmode) in typec_altmode_put_partner() argument
262 struct altmode *partner = altmode->partner; in typec_altmode_put_partner()
360 struct altmode *altmode = to_altmode(adev); in active_store() local
375 if (altmode->partner && !enter && altmode->partner->adev.active) in active_store()
[all …]
/Linux-v5.15/drivers/usb/typec/tcpm/
Dtcpm.c1536 struct typec_altmode *altmode; in tcpm_register_partner_altmodes() local
1540 altmode = typec_partner_register_altmode(port->partner, in tcpm_register_partner_altmodes()
1542 if (IS_ERR(altmode)) { in tcpm_register_partner_altmodes()
1545 altmode = NULL; in tcpm_register_partner_altmodes()
1547 port->partner_altmode[i] = altmode; in tcpm_register_partner_altmodes()
2177 static int tcpm_altmode_enter(struct typec_altmode *altmode, u32 *vdo) in tcpm_altmode_enter() argument
2179 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); in tcpm_altmode_enter()
2187 header = VDO(altmode->svid, vdo ? 2 : 1, svdm_version, CMD_ENTER_MODE); in tcpm_altmode_enter()
2188 header |= VDO_OPOS(altmode->mode); in tcpm_altmode_enter()
2194 static int tcpm_altmode_exit(struct typec_altmode *altmode) in tcpm_altmode_exit() argument
[all …]
/Linux-v5.15/drivers/usb/typec/ucsi/
Ducsi.c194 const struct typec_altmode *altmode = NULL; in ucsi_altmode_update_active() local
212 altmode = typec_altmode_get_partner(con->port_altmode[cur]); in ucsi_altmode_update_active()
216 con->partner_altmode[i] == altmode); in ucsi_altmode_update_active()