Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1720768 > unrolled thread

[PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED

Started byBadhri Jagan Sridharan <badhri@google.com>
First post2017-08-27 09:00 +0200
Last post2017-08-27 19:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED Badhri Jagan Sridharan <badhri@google.com> - 2017-08-27 09:00 +0200
    Re: [PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead  of SNK_UNATTACHED Guenter Roeck <linux@roeck-us.net> - 2017-08-27 19:30 +0200

#1720768 — [PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED

FromBadhri Jagan Sridharan <badhri@google.com>
Date2017-08-27 09:00 +0200
Subject[PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED
Message-ID<uiZI6-44i-9@gated-at.bofh.it>
When VBUS is not discovered within PD_T_PS_SOURCE_ON although Rp
is detected on CC, TCPM switches the port to SNK_UNATTACHED
state. SNK_UNATTACHED, however does not force TYPEC_CC_OPEN which
makes the partner(source) to think that it is connected.

To overcome this issue, force the port into PORT_RESET state
to make sure the CC lines are open.

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
---
 drivers/staging/typec/tcpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 9e0111dea7c4..47b8fec5ea36 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -2380,7 +2380,7 @@ static void run_state_machine(struct tcpm_port *port)
 				       0);
 		else
 			/* Wait for VBUS, but not forever */
-			tcpm_set_state(port, SNK_UNATTACHED, PD_T_PS_SOURCE_ON);
+			tcpm_set_state(port, PORT_RESET, PD_T_PS_SOURCE_ON);
 		break;
 
 	case SRC_TRY:
-- 
2.14.1.342.g6490525c54-goog

[toc] | [next] | [standalone]


#1720884 — Re: [PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED

FromGuenter Roeck <linux@roeck-us.net>
Date2017-08-27 19:30 +0200
SubjectRe: [PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED
Message-ID<uj9xL-2j1-7@gated-at.bofh.it>
In reply to#1720768
On Sat, Aug 26, 2017 at 11:52:33PM -0700, Badhri Jagan Sridharan wrote:
> When VBUS is not discovered within PD_T_PS_SOURCE_ON although Rp
> is detected on CC, TCPM switches the port to SNK_UNATTACHED
> state. SNK_UNATTACHED, however does not force TYPEC_CC_OPEN which
> makes the partner(source) to think that it is connected.
> 
> To overcome this issue, force the port into PORT_RESET state
> to make sure the CC lines are open.
> 
> Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/staging/typec/tcpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
> index 9e0111dea7c4..47b8fec5ea36 100644
> --- a/drivers/staging/typec/tcpm.c
> +++ b/drivers/staging/typec/tcpm.c
> @@ -2380,7 +2380,7 @@ static void run_state_machine(struct tcpm_port *port)
>  				       0);
>  		else
>  			/* Wait for VBUS, but not forever */
> -			tcpm_set_state(port, SNK_UNATTACHED, PD_T_PS_SOURCE_ON);
> +			tcpm_set_state(port, PORT_RESET, PD_T_PS_SOURCE_ON);
>  		break;
>  
>  	case SRC_TRY:
> -- 
> 2.14.1.342.g6490525c54-goog
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web