lkml.org 
[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] usb: typec: don't disable sink or source on initialization
From
Date
Hello!

On 9/6/2018 10:26 PM, Angus Ainslie (Purism) wrote:

> If the board is being powered by USB disabling the source and sink
> can remove power from the board. Default to source and sink enabled.
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
> drivers/usb/typec/tcpm.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c
> index ca7bedb46f7f..a1b819cf31da 100644
> --- a/drivers/usb/typec/tcpm.c
> +++ b/drivers/usb/typec/tcpm.c
> @@ -2462,9 +2462,11 @@ static int tcpm_init_vbus(struct tcpm_port *port)
> {
> int ret;
>
> - ret = port->tcpc->set_vbus(port->tcpc, false, false);
> - port->vbus_source = false;
> - port->vbus_charge = false;
> + /* default to source and sink enabled in case USB is our only power
> + * source */

The multi-line comments should look like this:

/*
* bla
* bla
*/

[...]

MBR, Sergei

\
 
 \ /
  Last update: 2018-09-07 11:39    [W:0.337 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site