Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1037812imm; Thu, 6 Sep 2018 14:18:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ4K4rS1pQTMTyobVcehKBINzMWHPdxizvychEcSbSaUwD20WMAiMilhBS3dboOiDXsMp9a X-Received: by 2002:a63:fb07:: with SMTP id o7-v6mr4861770pgh.333.1536268737343; Thu, 06 Sep 2018 14:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536268737; cv=none; d=google.com; s=arc-20160816; b=CF0nNibnzX2iJURhQqVVgNhMRXHpQDRtjHPtRE5R1xT5lnVDia8dyVm4Jr2a324gMq CQ/GyMt5D43h5R+HV9RNgUA62JCFxY9f8e/k/dHjYZgMch8ZVUbBYv70Pgyil3ZJ0Jb3 A68k1BBvtzRlMMEDi5lRes7s0slpYvmYu3zqHQeh7Q7V8f7LZN22N9pOvROpKdj0GLQH gIssb8wk22NVcAGMlWu2O8CQVP00vdVTT6CHC+/z9tRIcj201YykbJ0BvBbrfjcflMTW Nr73C17U7WsBlmBFWjlhBZLGX3QjXZi/PgGUuvm4J83Q8G41DhnF2bxsNxeJcvQ0xXML ndbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=pl8iQv5Xs8vqp2I/bTrbJRdWs0RmqcAX9AMOI1isexs=; b=VZoeMHXJ8/kjyPtEEQ7cBIubGSOgr8XX8DjjBGMMx/9SvA2NGNfPtbQLl2lLfP6AR+ Xr4v5Wab4R88ARNBTaNG6SICVQk1PC+BG2ElNZRW0S+1Me87MgWryNMDT3jAyXHmyePX faKAfI5NGnJdEqR92e28CnhN4cQChOLHgb6n6b5t4u0TRLU28VtB4zg7bsXNF1uK7Bxm TM/QmKJfQM3W5uItoofB4IvZs1+90/zx3kXlFcMvcGSG+xlFaWPWBMvGHpcPzdcoZfTQ F3faAbhQPdr5/DrC+vC6nHB8ILsTbqQkjrtfnl14uqwtbDa7I2TQBb7WSw34fOQawGt/ L2hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@akkea.ca header.s=mail header.b=VL9jg9H+; dkim=pass header.i=@akkea.ca header.s=mail header.b=pysE7kyT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9-v6si6531501pgr.244.2018.09.06.14.18.42; Thu, 06 Sep 2018 14:18:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@akkea.ca header.s=mail header.b=VL9jg9H+; dkim=pass header.i=@akkea.ca header.s=mail header.b=pysE7kyT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728330AbeIGAKi (ORCPT + 99 others); Thu, 6 Sep 2018 20:10:38 -0400 Received: from node.akkea.ca ([192.155.83.177]:40694 "EHLO node.akkea.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728011AbeIGAKi (ORCPT ); Thu, 6 Sep 2018 20:10:38 -0400 Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 1BE145420F0; Thu, 6 Sep 2018 19:27:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1536262023; bh=pl8iQv5Xs8vqp2I/bTrbJRdWs0RmqcAX9AMOI1isexs=; h=From:To:Cc:Subject:Date; b=VL9jg9H+OwOUyklxa3z0FKhASmM4+MSttC5FOGcCB9N+W8N2uTLz1eg8Kef/b9vMq /SATYMgMeweMw+cvJ88gzPOACr2yWo4J0WRNkcERc3vNWaxTyq5Dt2SAyRRARFk0pN iN63/vPWdVkPKAGjZsoCPWRYneQWtKX0IqUm9pjE= X-Virus-Scanned: Debian amavisd-new at mail.akkea.ca Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TrWbLe468vYm; Thu, 6 Sep 2018 19:27:02 +0000 (UTC) Received: from localhost.localdomain (S010614dae980e3b8.cg.shawcable.net [68.147.236.72]) by node.akkea.ca (Postfix) with ESMTPSA id 4B6F45420EE; Thu, 6 Sep 2018 19:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1536262022; bh=pl8iQv5Xs8vqp2I/bTrbJRdWs0RmqcAX9AMOI1isexs=; h=From:To:Cc:Subject:Date; b=pysE7kyT3weFKa5CX3ngo3RsB06CwlH4Ga5JMR9Lh0iehRrQIfhj/I+5A4cJ2QZN1 BVyZWhyw8pe94KfSVnTJHRCE/IRiSRB/UHGB8NKMOeGYAynrszO/mMQSHbAgmbS5Om 2G2ompKUGbekpeWoIZhwfrWeCg8A78cd3vlyfp/4= From: "Angus Ainslie (Purism)" To: Heikki Krogerus Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, "Angus Ainslie (Purism)" Subject: [PATCH] usb: typec: don't disable sink or source on initialization Date: Thu, 6 Sep 2018 13:26:44 -0600 Message-Id: <20180906192644.24587-1-angus@akkea.ca> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) --- 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