lkml.org 
[lkml]   [2018]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH v3 4/5] usb: typec: pi3usb30532: Start using generic state values
Date
Instead of the tcpm specific mux states, using the generic
USB type-c connector state values.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
drivers/usb/typec/mux/pi3usb30532.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/typec/mux/pi3usb30532.c b/drivers/usb/typec/mux/pi3usb30532.c
index b0e88db60ecf..09b711dfe5c3 100644
--- a/drivers/usb/typec/mux/pi3usb30532.c
+++ b/drivers/usb/typec/mux/pi3usb30532.c
@@ -83,13 +83,15 @@ static int pi3usb30532_mux_set(struct typec_mux *mux, int state)
new_conf = pi->conf;

switch (state) {
- case TYPEC_MUX_NONE:
+ case TYPEC_STATE_SAFE:
new_conf = PI3USB30532_CONF_OPEN;
break;
- case TYPEC_MUX_USB:
+ case TYPEC_STATE_USB:
new_conf = (new_conf & PI3USB30532_CONF_SWAP) |
- PI3USB30532_CONF_USB3;
+ PI3USB30532_CONF_USB3;
break;
+ /* To be replaced with actual DisplayPort connector states */
+ /*
case TYPEC_MUX_DP:
new_conf = (new_conf & PI3USB30532_CONF_SWAP) |
PI3USB30532_CONF_4LANE_DP;
@@ -98,6 +100,9 @@ static int pi3usb30532_mux_set(struct typec_mux *mux, int state)
new_conf = (new_conf & PI3USB30532_CONF_SWAP) |
PI3USB30532_CONF_USB3_AND_2LANE_DP;
break;
+ */
+ default:
+ break;
}

ret = pi3usb30532_set_conf(pi, new_conf);
--
2.17.0
\
 
 \ /
  Last update: 2018-05-11 15:19    [W:0.060 / U:7.920 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site