[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180906192644.24587-1-angus@akkea.ca>
Date: Thu, 6 Sep 2018 13:26:44 -0600
From: "Angus Ainslie (Purism)" <angus@...ea.ca>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
"Angus Ainslie (Purism)" <angus@...ea.ca>
Subject: [PATCH] usb: typec: don't disable sink or source on initialization
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@...ea.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 */
+ ret = port->tcpc->set_vbus(port->tcpc, true, true);
+ port->vbus_source = true;
+ port->vbus_charge = true;
return ret;
}
--
2.17.1
Powered by blists - more mailing lists