altmode 13 drivers/usb/typec/bus.c static inline int typec_altmode_set_mux(struct altmode *alt, u8 state) altmode 21 drivers/usb/typec/bus.c struct altmode *port_altmode; altmode 55 drivers/usb/typec/bus.c struct altmode *altmode; altmode 56 drivers/usb/typec/bus.c struct altmode *partner; altmode 62 drivers/usb/typec/bus.c altmode = to_altmode(adev); altmode 64 drivers/usb/typec/bus.c if (!altmode->partner) altmode 68 drivers/usb/typec/bus.c partner = altmode->partner; altmode 70 drivers/usb/typec/bus.c ret = typec_altmode_set_mux(is_port ? altmode : partner, (u8)conf); altmode 74 drivers/usb/typec/bus.c blocking_notifier_call_chain(is_port ? &altmode->nh : &partner->nh, altmode 94 drivers/usb/typec/bus.c struct altmode *partner = to_altmode(adev)->partner; altmode 122 drivers/usb/typec/bus.c struct altmode *partner = to_altmode(adev)->partner; altmode 173 drivers/usb/typec/bus.c struct altmode *altmode; altmode 178 drivers/usb/typec/bus.c altmode = to_altmode(adev); altmode 180 drivers/usb/typec/bus.c if (!altmode->partner) altmode 183 drivers/usb/typec/bus.c pdev = &altmode->partner->adev; altmode 216 drivers/usb/typec/bus.c struct altmode *port = to_altmode(adev)->partner; altmode 306 drivers/usb/typec/bus.c struct typec_altmode *altmode = to_typec_altmode(dev); altmode 310 drivers/usb/typec/bus.c if (id->svid == altmode->svid && altmode 311 drivers/usb/typec/bus.c (id->mode == TYPEC_ANY_MODE || id->mode == altmode->mode)) altmode 318 drivers/usb/typec/bus.c struct typec_altmode *altmode = to_typec_altmode(dev); altmode 320 drivers/usb/typec/bus.c if (add_uevent_var(env, "SVID=%04X", altmode->svid)) altmode 323 drivers/usb/typec/bus.c if (add_uevent_var(env, "MODE=%u", altmode->mode)) altmode 327 drivers/usb/typec/bus.c altmode->svid, altmode->mode); altmode 330 drivers/usb/typec/bus.c static int typec_altmode_create_links(struct altmode *alt) altmode 347 drivers/usb/typec/bus.c static void typec_altmode_remove_links(struct altmode *alt) altmode 357 drivers/usb/typec/bus.c struct altmode *altmode = to_altmode(adev); altmode 361 drivers/usb/typec/bus.c if (!altmode->partner) altmode 364 drivers/usb/typec/bus.c ret = typec_altmode_create_links(altmode); altmode 372 drivers/usb/typec/bus.c typec_altmode_remove_links(altmode); altmode 381 drivers/usb/typec/bus.c struct altmode *altmode = to_altmode(adev); altmode 383 drivers/usb/typec/bus.c typec_altmode_remove_links(altmode); altmode 23 drivers/usb/typec/bus.h struct altmode *partner; altmode 24 drivers/usb/typec/bus.h struct altmode *plug[2]; altmode 29 drivers/usb/typec/bus.h #define to_altmode(d) container_of(d, struct altmode, adev) altmode 162 drivers/usb/typec/class.c static void typec_altmode_set_partner(struct altmode *altmode) altmode 164 drivers/usb/typec/class.c struct typec_altmode *adev = &altmode->adev; altmode 167 drivers/usb/typec/class.c struct altmode *partner; altmode 176 drivers/usb/typec/class.c altmode->partner = partner; altmode 182 drivers/usb/typec/class.c partner->plug[plug->index] = altmode; altmode 184 drivers/usb/typec/class.c partner->partner = altmode; altmode 188 drivers/usb/typec/class.c static void typec_altmode_put_partner(struct altmode *altmode) altmode 190 drivers/usb/typec/class.c struct altmode *partner = altmode->partner; altmode 231 drivers/usb/typec/class.c struct altmode *altmode; altmode 248 drivers/usb/typec/class.c altmode = to_altmode(to_typec_altmode(altmode_dev)); altmode 251 drivers/usb/typec/class.c ret = blocking_notifier_chain_register(&altmode->nh, nb); altmode 257 drivers/usb/typec/class.c return &altmode->adev; altmode 264 drivers/usb/typec/class.c struct altmode *altmode = to_altmode(adev); altmode 266 drivers/usb/typec/class.c blocking_notifier_chain_unregister(&altmode->nh, nb); altmode 351 drivers/usb/typec/class.c struct altmode *altmode = to_altmode(adev); altmode 366 drivers/usb/typec/class.c if (altmode->partner && !enter && altmode->partner->adev.active) altmode 367 drivers/usb/typec/class.c typec_altmode_exit(&altmode->partner->adev); altmode 368 drivers/usb/typec/class.c } else if (altmode->partner) { altmode 369 drivers/usb/typec/class.c if (enter && !altmode->partner->adev.active) { altmode 390 drivers/usb/typec/class.c struct altmode *alt = to_altmode(to_typec_altmode(dev)); altmode 466 drivers/usb/typec/class.c struct altmode *alt = to_altmode(to_typec_altmode(dev)); altmode 486 drivers/usb/typec/class.c struct altmode *alt; altmode 1039 drivers/usb/typec/tcpm/tcpm.c struct typec_altmode *altmode; altmode 1043 drivers/usb/typec/tcpm/tcpm.c altmode = typec_partner_register_altmode(port->partner, altmode 1045 drivers/usb/typec/tcpm/tcpm.c if (!altmode) altmode 1048 drivers/usb/typec/tcpm/tcpm.c port->partner_altmode[i] = altmode; altmode 1487 drivers/usb/typec/tcpm/tcpm.c static int tcpm_altmode_enter(struct typec_altmode *altmode) altmode 1489 drivers/usb/typec/tcpm/tcpm.c struct tcpm_port *port = typec_altmode_get_drvdata(altmode); altmode 1493 drivers/usb/typec/tcpm/tcpm.c header = VDO(altmode->svid, 1, CMD_ENTER_MODE); altmode 1494 drivers/usb/typec/tcpm/tcpm.c header |= VDO_OPOS(altmode->mode); altmode 1503 drivers/usb/typec/tcpm/tcpm.c static int tcpm_altmode_exit(struct typec_altmode *altmode) altmode 1505 drivers/usb/typec/tcpm/tcpm.c struct tcpm_port *port = typec_altmode_get_drvdata(altmode); altmode 1509 drivers/usb/typec/tcpm/tcpm.c header = VDO(altmode->svid, 1, CMD_EXIT_MODE); altmode 1510 drivers/usb/typec/tcpm/tcpm.c header |= VDO_OPOS(altmode->mode); altmode 1519 drivers/usb/typec/tcpm/tcpm.c static int tcpm_altmode_vdm(struct typec_altmode *altmode, altmode 1522 drivers/usb/typec/tcpm/tcpm.c struct tcpm_port *port = typec_altmode_get_drvdata(altmode); altmode 224 drivers/usb/typec/ucsi/ucsi.c const struct typec_altmode *altmode = NULL; altmode 242 drivers/usb/typec/ucsi/ucsi.c altmode = typec_altmode_get_partner(con->port_altmode[cur]); altmode 246 drivers/usb/typec/ucsi/ucsi.c con->partner_altmode[i] == altmode); altmode 119 include/linux/usb/typec.h void typec_unregister_altmode(struct typec_altmode *altmode); altmode 37 include/linux/usb/typec_altmode.h static inline void typec_altmode_set_drvdata(struct typec_altmode *altmode, altmode 40 include/linux/usb/typec_altmode.h dev_set_drvdata(&altmode->dev, data); altmode 43 include/linux/usb/typec_altmode.h static inline void *typec_altmode_get_drvdata(struct typec_altmode *altmode) altmode 45 include/linux/usb/typec_altmode.h return dev_get_drvdata(&altmode->dev); altmode 58 include/linux/usb/typec_altmode.h int (*enter)(struct typec_altmode *altmode); altmode 59 include/linux/usb/typec_altmode.h int (*exit)(struct typec_altmode *altmode); altmode 60 include/linux/usb/typec_altmode.h void (*attention)(struct typec_altmode *altmode, u32 vdo); altmode 61 include/linux/usb/typec_altmode.h int (*vdm)(struct typec_altmode *altmode, const u32 hdr, altmode 63 include/linux/usb/typec_altmode.h int (*notify)(struct typec_altmode *altmode, unsigned long conf, altmode 65 include/linux/usb/typec_altmode.h int (*activate)(struct typec_altmode *altmode, int activate); altmode 68 include/linux/usb/typec_altmode.h int typec_altmode_enter(struct typec_altmode *altmode); altmode 69 include/linux/usb/typec_altmode.h int typec_altmode_exit(struct typec_altmode *altmode); altmode 70 include/linux/usb/typec_altmode.h void typec_altmode_attention(struct typec_altmode *altmode, u32 vdo); altmode 71 include/linux/usb/typec_altmode.h int typec_altmode_vdm(struct typec_altmode *altmode, altmode 73 include/linux/usb/typec_altmode.h int typec_altmode_notify(struct typec_altmode *altmode, unsigned long conf, altmode 76 include/linux/usb/typec_altmode.h typec_altmode_get_partner(struct typec_altmode *altmode); altmode 106 include/linux/usb/typec_altmode.h struct typec_altmode *typec_altmode_get_plug(struct typec_altmode *altmode, altmode 125 include/linux/usb/typec_altmode.h typec_altmode_get_orientation(struct typec_altmode *altmode) altmode 127 include/linux/usb/typec_altmode.h return typec_get_orientation(typec_altmode2port(altmode)); altmode 142 include/linux/usb/typec_altmode.h int (*probe)(struct typec_altmode *altmode); altmode 143 include/linux/usb/typec_altmode.h void (*remove)(struct typec_altmode *altmode);