lkml.org 
[lkml]   [2017]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/5] staging: typec: tcpm: Drop commented out code
Date
Commented out code can be added as needed. Drop it.
Also drop TODO and an obsolete XXX comment.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/staging/typec/tcpm.c | 37 +------------------------------------
1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 8af62e74d54c..cb25ec8334b0 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -908,27 +908,6 @@ static void svdm_consume_identity(struct tcpm_port *port, const __le32 *payload,

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

-#if 0 /* Not really a match */
- switch (PD_IDH_PTYPE(vdo)) {
- case IDH_PTYPE_UNDEF:
- port->partner.type = TYPEC_PARTNER_NONE; /* no longer exists */
- break;
- case IDH_PTYPE_HUB:
- break;
- case IDH_PTYPE_PERIPH:
- break;
- case IDH_PTYPE_PCABLE:
- break;
- case IDH_PTYPE_ACABLE:
- break;
- case IDH_PTYPE_AMA:
- port->partner.type = TYPEC_PARTNER_ALTMODE;
- break;
- default:
- break;
- }
-#endif
-
port->partner_ident.id_header = vdo;
port->partner_ident.cert_stat = le32_to_cpu(payload[VDO_INDEX_CSTAT]);
port->partner_ident.product = product;
@@ -1103,11 +1082,7 @@ static int tcpm_pd_svdm(struct tcpm_port *port, const __le32 *payload, int cnt,
response[0] = VDO(svid, 1, CMD_DISCOVER_MODES);
rlen = 1;
} else {
-#if 0
- response[0] = pd_dfp_enter_mode(port, 0, 0);
- if (response[0])
- rlen = 1;
-#endif
+ /* enter alternate mode if/when implemented */
}
break;
case CMD_ENTER_MODE:
@@ -1145,10 +1120,6 @@ static void tcpm_handle_vdm_request(struct tcpm_port *port,

if (PD_VDO_SVDM(p0))
rlen = tcpm_pd_svdm(port, payload, cnt, response);
-#if 0
- else
- rlen = tcpm_pd_custom_vdm(port, cnt, payload, response);
-#endif

if (rlen > 0) {
tcpm_queue_vdm(port, response[0], &response[1], rlen - 1);
@@ -2442,7 +2413,6 @@ static void run_state_machine(struct tcpm_port *port)
tcpm_set_state(port, SNK_STARTUP, 0);
break;
case SNK_STARTUP:
- /* XXX: callback into infrastructure */
opmode = tcpm_get_pwr_opmode(port->polarity ?
port->cc2 : port->cc1);
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)

port->partner_desc.identity = &port->partner_ident;
port->port_type = tcpc->config->type;
- /*
- * TODO:
- * - alt_modes, set_alt_mode
- * - {debug,audio}_accessory
- */

port->typec_port = typec_register_port(port->dev, &port->typec_caps);
if (!port->typec_port) {
--
2.7.4
\
 
 \ /
  Last update: 2017-09-10 22:38    [W:0.109 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site