[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180511131838.62064-5-heikki.krogerus@linux.intel.com>
Date: Fri, 11 May 2018 16:18:37 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Guenter Roeck <linux@...ck-us.net>,
Hans de Goede <hdegoede@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jun Li <jun.li@....com>, Mats Karrman <mats.dev.list@...il.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [RFC PATCH v3 4/5] usb: typec: pi3usb30532: Start using generic state values
Instead of the tcpm specific mux states, using the generic
USB type-c connector state values.
Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.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
Powered by blists - more mailing lists