Skip to content

Commit 44262fa

Browse files
groeckgregkh
authored andcommitted
staging: typec: tcpm: Drop commented out code
Commented out code can be added as needed. Drop it. Also drop TODO and an obsolete XXX comment. Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Heikki Krogerus <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2bd6bf0 commit 44262fa

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

drivers/staging/typec/tcpm.c

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -908,27 +908,6 @@ static void svdm_consume_identity(struct tcpm_port *port, const __le32 *payload,
908908

909909
memset(&port->mode_data, 0, sizeof(port->mode_data));
910910

911-
#if 0 /* Not really a match */
912-
switch (PD_IDH_PTYPE(vdo)) {
913-
case IDH_PTYPE_UNDEF:
914-
port->partner.type = TYPEC_PARTNER_NONE; /* no longer exists */
915-
break;
916-
case IDH_PTYPE_HUB:
917-
break;
918-
case IDH_PTYPE_PERIPH:
919-
break;
920-
case IDH_PTYPE_PCABLE:
921-
break;
922-
case IDH_PTYPE_ACABLE:
923-
break;
924-
case IDH_PTYPE_AMA:
925-
port->partner.type = TYPEC_PARTNER_ALTMODE;
926-
break;
927-
default:
928-
break;
929-
}
930-
#endif
931-
932911
port->partner_ident.id_header = vdo;
933912
port->partner_ident.cert_stat = le32_to_cpu(payload[VDO_INDEX_CSTAT]);
934913
port->partner_ident.product = product;
@@ -1103,11 +1082,7 @@ static int tcpm_pd_svdm(struct tcpm_port *port, const __le32 *payload, int cnt,
11031082
response[0] = VDO(svid, 1, CMD_DISCOVER_MODES);
11041083
rlen = 1;
11051084
} else {
1106-
#if 0
1107-
response[0] = pd_dfp_enter_mode(port, 0, 0);
1108-
if (response[0])
1109-
rlen = 1;
1110-
#endif
1085+
/* enter alternate mode if/when implemented */
11111086
}
11121087
break;
11131088
case CMD_ENTER_MODE:
@@ -1145,10 +1120,6 @@ static void tcpm_handle_vdm_request(struct tcpm_port *port,
11451120

11461121
if (PD_VDO_SVDM(p0))
11471122
rlen = tcpm_pd_svdm(port, payload, cnt, response);
1148-
#if 0
1149-
else
1150-
rlen = tcpm_pd_custom_vdm(port, cnt, payload, response);
1151-
#endif
11521123

11531124
if (rlen > 0) {
11541125
tcpm_queue_vdm(port, response[0], &response[1], rlen - 1);
@@ -2442,7 +2413,6 @@ static void run_state_machine(struct tcpm_port *port)
24422413
tcpm_set_state(port, SNK_STARTUP, 0);
24432414
break;
24442415
case SNK_STARTUP:
2445-
/* XXX: callback into infrastructure */
24462416
opmode = tcpm_get_pwr_opmode(port->polarity ?
24472417
port->cc2 : port->cc1);
24482418
typec_set_pwr_opmode(port->typec_port, opmode);
@@ -3589,11 +3559,6 @@ struct tcpm_port *tcpm_register_port(struct device *dev, struct tcpc_dev *tcpc)
35893559

35903560
port->partner_desc.identity = &port->partner_ident;
35913561
port->port_type = tcpc->config->type;
3592-
/*
3593-
* TODO:
3594-
* - alt_modes, set_alt_mode
3595-
* - {debug,audio}_accessory
3596-
*/
35973562

35983563
port->typec_port = typec_register_port(port->dev, &port->typec_caps);
35993564
if (!port->typec_port) {

0 commit comments

Comments
 (0)