mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Badhri Jagan Sridharan <badhri@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED
Date: Sun, 27 Aug 2017 10:27:52 -0700	[thread overview]
Message-ID: <20170827172752.GU22819@roeck-us.net> (raw)
In-Reply-To: <20170827065233.3524-1-Badhri@google.com>

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
> 

      reply	other threads:[~2017-08-27 17:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27  6:52 Badhri Jagan Sridharan
2017-08-27 17:27 ` Guenter Roeck [this message]

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=20170827172752.GU22819@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=badhri@google.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®