diff mbox series

[v2,2/8] platform/chrome: cros_ec_typec: Correct the Thunderbolt rounded/non-rounded cable support

Message ID 20201113202503.6559-3-utkarsh.h.patel@intel.com (mailing list archive)
State Superseded
Headers show
Series Thunderbolt3/USB4 cable rounded and active cable plug link training support | expand

Commit Message

Patel, Utkarsh H Nov. 13, 2020, 8:24 p.m. UTC
Thunderbolt rounded/non-rounded cable support is two bits value. Correcting
it as per the Thunderbolt 3 cable discover mode VDO changes done in the
Thunderbolt 3 alternate mode header.

Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com>
--
Changes in v2:
- Removed the fixes tag as there is no functional implication.
--
---
 drivers/platform/chrome/cros_ec_typec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Heikki Krogerus Nov. 17, 2020, 10:44 a.m. UTC | #1
On Fri, Nov 13, 2020 at 12:24:57PM -0800, Utkarsh Patel wrote:
> Thunderbolt rounded/non-rounded cable support is two bits value. Correcting
> it as per the Thunderbolt 3 cable discover mode VDO changes done in the
> Thunderbolt 3 alternate mode header.
> 
> Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com>

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

> --
> Changes in v2:
> - Removed the fixes tag as there is no functional implication.
> --
> ---
>  drivers/platform/chrome/cros_ec_typec.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
> index 31be31161350..8111ed1fc574 100644
> --- a/drivers/platform/chrome/cros_ec_typec.c
> +++ b/drivers/platform/chrome/cros_ec_typec.c
> @@ -438,8 +438,7 @@ static int cros_typec_enable_tbt(struct cros_typec_data *typec,
>  	if (pd_ctrl->control_flags & USB_PD_CTRL_ACTIVE_LINK_UNIDIR)
>  		data.cable_mode |= TBT_CABLE_LINK_TRAINING;
>  
> -	if (pd_ctrl->cable_gen)
> -		data.cable_mode |= TBT_CABLE_ROUNDED;
> +	data.cable_mode |= TBT_SET_CABLE_ROUNDED(pd_ctrl->cable_gen);
>  
>  	/* Enter Mode VDO */
>  	data.enter_vdo = TBT_SET_CABLE_SPEED(pd_ctrl->cable_speed);
> -- 
> 2.17.1

thanks,
Enric Balletbo i Serra Nov. 17, 2020, 10:49 a.m. UTC | #2
On 13/11/20 21:24, Utkarsh Patel wrote:
> Thunderbolt rounded/non-rounded cable support is two bits value. Correcting
> it as per the Thunderbolt 3 cable discover mode VDO changes done in the
> Thunderbolt 3 alternate mode header.
> 
> Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com>

Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

> --
> Changes in v2:
> - Removed the fixes tag as there is no functional implication.
> --
> ---
>  drivers/platform/chrome/cros_ec_typec.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
> index 31be31161350..8111ed1fc574 100644
> --- a/drivers/platform/chrome/cros_ec_typec.c
> +++ b/drivers/platform/chrome/cros_ec_typec.c
> @@ -438,8 +438,7 @@ static int cros_typec_enable_tbt(struct cros_typec_data *typec,
>  	if (pd_ctrl->control_flags & USB_PD_CTRL_ACTIVE_LINK_UNIDIR)
>  		data.cable_mode |= TBT_CABLE_LINK_TRAINING;
>  
> -	if (pd_ctrl->cable_gen)
> -		data.cable_mode |= TBT_CABLE_ROUNDED;
> +	data.cable_mode |= TBT_SET_CABLE_ROUNDED(pd_ctrl->cable_gen);
>  
>  	/* Enter Mode VDO */
>  	data.enter_vdo = TBT_SET_CABLE_SPEED(pd_ctrl->cable_speed);
>
diff mbox series

Patch

diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index 31be31161350..8111ed1fc574 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -438,8 +438,7 @@  static int cros_typec_enable_tbt(struct cros_typec_data *typec,
 	if (pd_ctrl->control_flags & USB_PD_CTRL_ACTIVE_LINK_UNIDIR)
 		data.cable_mode |= TBT_CABLE_LINK_TRAINING;
 
-	if (pd_ctrl->cable_gen)
-		data.cable_mode |= TBT_CABLE_ROUNDED;
+	data.cable_mode |= TBT_SET_CABLE_ROUNDED(pd_ctrl->cable_gen);
 
 	/* Enter Mode VDO */
 	data.enter_vdo = TBT_SET_CABLE_SPEED(pd_ctrl->cable_speed);