lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <89e0f9ac-4b9e-6fa1-de23-5ce305e1d2f0@cogentembedded.com>
Date:   Fri, 8 Jun 2018 20:51:28 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Hans de Goede <hdegoede@...hat.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jun Li <jun.li@....com>,
        Mats Karrman <mats.dev.list@...il.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v4 7/8] usb: typec: pi3usb30532: Start using generic
 state values

On 06/08/2018 02:29 PM, Heikki Krogerus wrote:

> Instead of the tcpm specific mux states, using the generic
> USB type-c connector state values, and with DisplayPort
> using connector states defined for the DisplayPort Alt Mode.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
> ---
>  drivers/usb/typec/mux/pi3usb30532.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/typec/mux/pi3usb30532.c b/drivers/usb/typec/mux/pi3usb30532.c
> index b0e88db60ecf..bcea242852f2 100644
> --- a/drivers/usb/typec/mux/pi3usb30532.c
> +++ b/drivers/usb/typec/mux/pi3usb30532.c
[...]
> @@ -83,21 +83,24 @@ 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;

   Unrelated white space change, inconsistent with the others below...

>  		break;
> -	case TYPEC_MUX_DP:
> +	case TYPEC_DP_STATE_C:
> +	case TYPEC_DP_STATE_E:
>  		new_conf = (new_conf & PI3USB30532_CONF_SWAP) |
>  			   PI3USB30532_CONF_4LANE_DP;
>  		break;
> -	case TYPEC_MUX_DOCK:
> +	case TYPEC_DP_STATE_D:
>  		new_conf = (new_conf & PI3USB30532_CONF_SWAP) |
>  			   PI3USB30532_CONF_USB3_AND_2LANE_DP;
>  		break;
> +	default:
> +		break;
>  	}
>  
>  	ret = pi3usb30532_set_conf(pi, new_conf);

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ