Home
last modified time | relevance | path

Searched refs:altmode (Results 1 - 15 of 15) sorted by relevance

/kernel/linux/linux-6.6/drivers/soc/qcom/
H A Dpmic_glink_altmode.c67 struct pmic_glink_altmode *altmode; member
107 static int pmic_glink_altmode_request(struct pmic_glink_altmode *altmode, u32 cmd, u32 arg) in pmic_glink_altmode_request() argument
117 mutex_lock(&altmode->lock); in pmic_glink_altmode_request()
119 req.hdr.owner = cpu_to_le32(altmode->owner_id); in pmic_glink_altmode_request()
125 ret = pmic_glink_send(altmode->client, &req, sizeof(req)); in pmic_glink_altmode_request()
127 dev_err(altmode->dev, "failed to send altmode request: %#x (%d)\n", cmd, ret); in pmic_glink_altmode_request()
131 left = wait_for_completion_timeout(&altmode->pan_ack, 5 * HZ); in pmic_glink_altmode_request()
133 dev_err(altmode->dev, "timeout waiting for altmode reques in pmic_glink_altmode_request()
142 pmic_glink_altmode_enable_dp(struct pmic_glink_altmode *altmode, struct pmic_glink_altmode_port *port, u8 mode, bool hpd_state, bool hpd_irq) pmic_glink_altmode_enable_dp() argument
174 pmic_glink_altmode_enable_usb(struct pmic_glink_altmode *altmode, struct pmic_glink_altmode_port *port) pmic_glink_altmode_enable_usb() argument
196 pmic_glink_altmode_safe(struct pmic_glink_altmode *altmode, struct pmic_glink_altmode_port *port) pmic_glink_altmode_safe() argument
221 struct pmic_glink_altmode *altmode = alt_port->altmode; pmic_glink_altmode_worker() local
258 pmic_glink_altmode_sc8180xp_notify(struct pmic_glink_altmode *altmode, const void *data, size_t len) pmic_glink_altmode_sc8180xp_notify() argument
306 pmic_glink_altmode_sc8280xp_notify(struct pmic_glink_altmode *altmode, u16 svid, const void *data, size_t len) pmic_glink_altmode_sc8280xp_notify() argument
347 struct pmic_glink_altmode *altmode = priv; pmic_glink_altmode_callback() local
395 struct pmic_glink_altmode *altmode = work_to_altmode(work); pmic_glink_altmode_enable_worker() local
405 struct pmic_glink_altmode *altmode = priv; pmic_glink_altmode_pdr_notify() local
420 struct pmic_glink_altmode *altmode; pmic_glink_altmode_probe() local
[all...]
/kernel/linux/linux-6.6/include/linux/usb/
H A 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, in
130 typec_altmode_get_orientation(struct typec_altmode *altmode) typec_altmode_get_orientation() argument
140 typec_altmode_get_svdm_version(struct typec_altmode *altmode) typec_altmode_get_svdm_version() argument
[all...]
H A Dtypec.h160 void typec_unregister_altmode(struct typec_altmode *altmode);
/kernel/linux/linux-6.6/drivers/usb/typec/
H A Dbus.c17 typec_altmode_set_retimer(struct altmode *alt, unsigned long conf, void *data) in typec_altmode_set_retimer()
32 typec_altmode_set_mux(struct altmode *alt, unsigned long conf, void *data) in typec_altmode_set_mux()
48 typec_altmode_set_switches(struct altmode *alt, unsigned long conf, void *data) in typec_altmode_set_switches()
63 struct altmode *port_altmode; in typec_altmode_set_state()
90 struct altmode *altmode; in typec_altmode_notify() local
91 struct altmode *partner; in typec_altmode_notify()
97 altmode = to_altmode(adev); in typec_altmode_notify()
99 if (!altmode->partner) in typec_altmode_notify()
103 partner = altmode in typec_altmode_notify()
218 struct altmode *altmode; typec_altmode_vdm() local
351 struct typec_altmode *altmode = to_typec_altmode(dev); typec_match() local
363 const struct typec_altmode *altmode = to_typec_altmode(dev); typec_uevent() local
402 struct altmode *altmode = to_altmode(adev); typec_probe() local
426 struct altmode *altmode = to_altmode(adev); typec_remove() local
[all...]
H A Dbus.h12 struct altmode { struct
25 struct altmode *partner;
26 struct altmode *plug[2];
29 #define to_altmode(d) container_of(d, struct altmode, adev)
H A Dclass.c235 static void typec_altmode_set_partner(struct altmode *altmode) in typec_altmode_set_partner() argument
237 struct typec_altmode *adev = &altmode->adev; in typec_altmode_set_partner()
240 struct altmode *partner; in typec_altmode_set_partner()
249 altmode->partner = partner; in typec_altmode_set_partner()
255 partner->plug[plug->index] = altmode; in typec_altmode_set_partner()
257 partner->partner = altmode; in typec_altmode_set_partner()
261 static void typec_altmode_put_partner(struct altmode *altmode) in typec_altmode_put_partner() argument
263 struct altmode *partne in typec_altmode_put_partner()
363 struct altmode *altmode = to_altmode(adev); active_store() local
[all...]
/kernel/linux/linux-5.10/include/linux/usb/
H A 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, in
130 typec_altmode_get_orientation(struct typec_altmode *altmode) typec_altmode_get_orientation() argument
[all...]
H A Dtypec.h138 void typec_unregister_altmode(struct typec_altmode *altmode);
/kernel/linux/linux-5.10/drivers/usb/typec/
H A Dbus.c14 typec_altmode_set_mux(struct altmode *alt, unsigned long conf, void *data) in typec_altmode_set_mux()
32 struct altmode *port_altmode; in typec_altmode_set_state()
59 struct altmode *altmode; in typec_altmode_notify() local
60 struct altmode *partner; in typec_altmode_notify()
66 altmode = to_altmode(adev); in typec_altmode_notify()
68 if (!altmode->partner) in typec_altmode_notify()
72 partner = altmode->partner; in typec_altmode_notify()
74 ret = typec_altmode_set_mux(is_port ? altmode : partner, conf, data); in typec_altmode_notify()
97 struct altmode *partne in typec_altmode_enter()
187 struct altmode *altmode; typec_altmode_vdm() local
320 struct typec_altmode *altmode = to_typec_altmode(dev); typec_match() local
332 struct typec_altmode *altmode = to_typec_altmode(dev); typec_uevent() local
371 struct altmode *altmode = to_altmode(adev); typec_probe() local
395 struct altmode *altmode = to_altmode(adev); typec_remove() local
[all...]
H A Dbus.h11 struct altmode { struct
23 struct altmode *partner;
24 struct altmode *plug[2];
27 #define to_altmode(d) container_of(d, struct altmode, adev)
H A Dclass.c163 static void typec_altmode_set_partner(struct altmode *altmode) in typec_altmode_set_partner() argument
165 struct typec_altmode *adev = &altmode->adev; in typec_altmode_set_partner()
168 struct altmode *partner; in typec_altmode_set_partner()
177 altmode->partner = partner; in typec_altmode_set_partner()
183 partner->plug[plug->index] = altmode; in typec_altmode_set_partner()
185 partner->partner = altmode; in typec_altmode_set_partner()
189 static void typec_altmode_put_partner(struct altmode *altmode) in typec_altmode_put_partner() argument
191 struct altmode *partne in typec_altmode_put_partner()
291 struct altmode *altmode = to_altmode(adev); active_store() local
[all...]
/kernel/linux/linux-5.10/drivers/usb/typec/tcpm/
H A Dtcpm.c1179 struct typec_altmode *altmode; in tcpm_register_partner_altmodes() local
1183 altmode = typec_partner_register_altmode(port->partner, in tcpm_register_partner_altmodes()
1185 if (IS_ERR(altmode)) { in tcpm_register_partner_altmodes()
1188 altmode = NULL; in tcpm_register_partner_altmodes()
1190 port->partner_altmode[i] = altmode; in tcpm_register_partner_altmodes()
1399 tcpm_log(port, "typec_altmode_attention no port partner altmode"); in tcpm_handle_vdm_request()
1664 static int tcpm_altmode_enter(struct typec_altmode *altmode, u32 *vdo) in tcpm_altmode_enter() argument
1666 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); in tcpm_altmode_enter()
1669 header = VDO(altmode->svid, vdo ? 2 : 1, CMD_ENTER_MODE); in tcpm_altmode_enter()
1670 header |= VDO_OPOS(altmode in tcpm_altmode_enter()
1676 tcpm_altmode_exit(struct typec_altmode *altmode) tcpm_altmode_exit() argument
1688 tcpm_altmode_vdm(struct typec_altmode *altmode, u32 header, const u32 *data, int count) tcpm_altmode_vdm() argument
[all...]
/kernel/linux/linux-6.6/drivers/usb/typec/tcpm/
H A Dtcpm.c1576 struct typec_altmode *altmode; in tcpm_register_partner_altmodes() local
1580 altmode = typec_partner_register_altmode(port->partner, in tcpm_register_partner_altmodes()
1582 if (IS_ERR(altmode)) { in tcpm_register_partner_altmodes()
1585 altmode = NULL; in tcpm_register_partner_altmodes()
1587 port->partner_altmode[i] = altmode; in tcpm_register_partner_altmodes()
1884 tcpm_log(port, "typec_altmode_attention no port partner altmode"); in tcpm_handle_vdm_request()
2221 static int tcpm_altmode_enter(struct typec_altmode *altmode, u32 *vdo) in tcpm_altmode_enter() argument
2223 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); in tcpm_altmode_enter()
2231 header = VDO(altmode->svid, vdo ? 2 : 1, svdm_version, CMD_ENTER_MODE); in tcpm_altmode_enter()
2232 header |= VDO_OPOS(altmode in tcpm_altmode_enter()
2238 tcpm_altmode_exit(struct typec_altmode *altmode) tcpm_altmode_exit() argument
2255 tcpm_altmode_vdm(struct typec_altmode *altmode, u32 header, const u32 *data, int count) tcpm_altmode_vdm() argument
[all...]
/kernel/linux/linux-5.10/drivers/usb/typec/ucsi/
H A Ducsi.c198 const struct typec_altmode *altmode = NULL; in ucsi_altmode_update_active() local
216 altmode = typec_altmode_get_partner(con->port_altmode[cur]); in ucsi_altmode_update_active()
220 con->partner_altmode[i] == altmode); in ucsi_altmode_update_active()
382 * Update the original altmode table as some ppms may report in ucsi_register_altmodes_nvidia()
/kernel/linux/linux-6.6/drivers/usb/typec/ucsi/
H A Ducsi.c256 const struct typec_altmode *altmode = NULL; in ucsi_altmode_update_active() local
274 altmode = typec_altmode_get_partner(con->port_altmode[cur]); in ucsi_altmode_update_active()
278 con->partner_altmode[i] == altmode); in ucsi_altmode_update_active()
451 * Update the original altmode table as some ppms may report in ucsi_register_altmodes_nvidia()

Completed in 19 milliseconds