All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-usb@vger.kernel.org
Subject: usb: typec: pi3usb30532: Keep orientation when setting mux to safe mode
Date: Fri, 15 Mar 2019 16:36:13 +0200	[thread overview]
Message-ID: <20190315143613.GL7752@kuha.fi.intel.com> (raw)

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@redhat.com>

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  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,

             reply	other threads:[~2019-03-15 14:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 14:36 Heikki Krogerus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-19 13:38 usb: typec: pi3usb30532: Keep orientation when setting mux to safe mode Heikki Krogerus
2019-03-04  1:14 Guenter Roeck
2019-02-27  8:50 Heikki Krogerus
2019-02-25 18:52 Hans de Goede
2019-02-25 15:50 Heikki Krogerus
2019-02-22 19:22 Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190315143613.GL7752@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.