Hi,
On 25-02-19 16:50, Heikki Krogerus wrote:
On Fri, Feb 22, 2019 at 08:22:39PM +0100, Hans de Goede wrote:
Keep the orientation value when setting the mux to safe mode, this
fixes the orientation getting reset when switching alt-modes.
Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
Should this be also a fix?
This only comes into play when switching alt-modes, so more
or less the same as with the displayport altmode fix:
"There are no users if this yet, until we've agreement
on the DT bindings and code merged for adding alt-modes
to an usb-connector node, nothing will be using this code,
so I see little use in adding a Cc: stable or some such."
Regards,
Hans
---
drivers/usb/typec/mux/pi3usb30532.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/typec/mux/pi3usb30532.c b/drivers/usb/typec/mux/pi3usb30532.c
index 64eb5983e17a..9294e85fd34b 100644
--- a/drivers/usb/typec/mux/pi3usb30532.c
+++ b/drivers/usb/typec/mux/pi3usb30532.c
@@ -84,7 +84,8 @@ static int pi3usb30532_mux_set(struct typec_mux *mux, int state)
switch (state) {
case TYPEC_STATE_SAFE:
- new_conf = PI3USB30532_CONF_OPEN;
+ new_conf = (new_conf & PI3USB30532_CONF_SWAP) |
+ PI3USB30532_CONF_OPEN;
break;
case TYPEC_STATE_USB:
new_conf = (new_conf & PI3USB30532_CONF_SWAP) |
--
2.20.1
thanks,