Searched refs:altmode (Results 1 – 6 of 6) sorted by relevance
/Linux-v4.19/include/linux/usb/ |
D | typec_altmode.h | 37 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); 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 …]
|
D | typec.h | 119 void typec_unregister_altmode(struct typec_altmode *altmode);
|
/Linux-v4.19/drivers/usb/typec/ |
D | bus.c | 13 static inline int typec_altmode_set_mux(struct altmode *alt, u8 state) in typec_altmode_set_mux() 21 struct altmode *port_altmode; in typec_altmode_set_state() 55 struct altmode *altmode; in typec_altmode_notify() local 56 struct altmode *partner; in typec_altmode_notify() 62 altmode = to_altmode(adev); in typec_altmode_notify() 64 if (!altmode->partner) in typec_altmode_notify() 68 partner = altmode->partner; in typec_altmode_notify() 70 ret = typec_altmode_set_mux(is_port ? altmode : partner, (u8)conf); in typec_altmode_notify() 74 blocking_notifier_call_chain(is_port ? &altmode->nh : &partner->nh, in typec_altmode_notify() 94 struct altmode *partner = to_altmode(adev)->partner; in typec_altmode_enter() [all …]
|
D | bus.h | 11 struct altmode { struct 23 struct altmode *partner; argument 24 struct altmode *plug[2]; argument 29 #define to_altmode(d) container_of(d, struct altmode, adev) argument
|
D | class.c | 161 static void typec_altmode_set_partner(struct altmode *altmode) in typec_altmode_set_partner() argument 163 struct typec_altmode *adev = &altmode->adev; in typec_altmode_set_partner() 166 struct altmode *partner; in typec_altmode_set_partner() 175 altmode->partner = partner; in typec_altmode_set_partner() 181 partner->plug[plug->index] = altmode; in typec_altmode_set_partner() 183 partner->partner = altmode; in typec_altmode_set_partner() 187 static void typec_altmode_put_partner(struct altmode *altmode) in typec_altmode_put_partner() argument 189 struct altmode *partner = altmode->partner; in typec_altmode_put_partner() 225 struct altmode *altmode; in typec_altmode_register_notifier() local 242 altmode = to_altmode(to_typec_altmode(altmode_dev)); in typec_altmode_register_notifier() [all …]
|
D | tcpm.c | 1028 struct typec_altmode *altmode; in tcpm_register_partner_altmodes() local 1032 altmode = typec_partner_register_altmode(port->partner, in tcpm_register_partner_altmodes() 1034 if (!altmode) in tcpm_register_partner_altmodes() 1037 port->partner_altmode[i] = altmode; in tcpm_register_partner_altmodes() 1466 static int tcpm_altmode_enter(struct typec_altmode *altmode) in tcpm_altmode_enter() argument 1468 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); in tcpm_altmode_enter() 1472 header = VDO(altmode->svid, 1, CMD_ENTER_MODE); in tcpm_altmode_enter() 1473 header |= VDO_OPOS(altmode->mode); in tcpm_altmode_enter() 1482 static int tcpm_altmode_exit(struct typec_altmode *altmode) in tcpm_altmode_exit() argument 1484 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); in tcpm_altmode_exit() [all …]
|