diff options
author | Hans de Goede <hdegoede@redhat.com> | 2019-02-22 20:22:39 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-19 15:00:34 +0100 |
commit | bfb2ab8e7138fc484952a948275eb443e8b9a360 (patch) | |
tree | 53696053fae7158b8dac4405e11e4225d4e261e3 /drivers/usb/typec/mux | |
parent | 09fed4d64d3f1c3f9296d3f67eb19c8bf4b1c0c1 (diff) |
usb: typec: pi3usb30532: Keep orientation when setting mux to safe mode
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@redhat.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/mux')
-rw-r--r-- | drivers/usb/typec/mux/pi3usb30532.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |