Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1598235imm; Fri, 7 Sep 2018 03:05:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaVmTESrv2Cl2RHwUyRacLrP/uOWSgebbBcphxHIxzCOel5d4poLfvDAkiMEhNPAnQrzufR X-Received: by 2002:aa7:82c3:: with SMTP id f3-v6mr7837502pfn.136.1536314714515; Fri, 07 Sep 2018 03:05:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536314714; cv=none; d=google.com; s=arc-20160816; b=DlFyByUk0kNidrgCp5Z2wjaktnd7OedDGRAiLp7OooIbsSJ0hb3E1D5V1NKewcIbkA 0HbYfFrNx6GxxAqlzMQQpb8AJxTBtw36EuyiuXnq81xcZdDivexxRrQdQ82hCxz/kYZt Qb02x9ePZVejyNQkC1ODfo1wTyvhDD0YmEbBoDdFn+MW993gnsWyltiYnXs7dalyXZGG 7hgXDmwvNjlVfjkfy+PT3LYUA/VF5M+8zM9w3E4+bvUoyzhls8Xj0xFEhIKjWNP9K8oB +3H1uwh73FgutcVT6LNGcvcapmLF5vyHSMLvH2ydQjGGxH8/16s+QxNic26MCLYpfm6s mQ5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ANyHVdrhNp1oj4ND7UmGANeykDRjzuIoxvHYRgv5ElY=; b=GcH9C9X3fv8f5Lxc2u0LGkXpDGgG3JQQfRmZor7N+549r/1x6/t887LdLhPKkAS27y ehoJ2picyKVqCelQRvG6SMrGsCj/cM126A9cwysYqypdyhL7gqrpSpnL619CwIEXMjlM EaPuXixyEJpYoWnw5mI3t6Dw5EUlpfAaLg+Ehv0VDIsQb71MDIIe98YEaNH4uu4YWTpu ul/Mr8C5it0hnyHT/M2IXIolIyoGwiBaYPYa7Y7ty3G/hGJu9o1eqDESV3E4vbk6KCmU qyVvGRbINqg2P1GLGq3y/uG0x9HcZSvxWcyWXbxaCfUddV1C9LwOO6IbtzUKIha4rukQ 74RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=caLBK6MU; 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 m5-v6si8700752pfb.104.2018.09.07.03.04.58; Fri, 07 Sep 2018 03:05:14 -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=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=caLBK6MU; 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 S1728489AbeIGOT3 (ORCPT + 99 others); Fri, 7 Sep 2018 10:19:29 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:43282 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727941AbeIGOT3 (ORCPT ); Fri, 7 Sep 2018 10:19:29 -0400 Received: by mail-lf1-f65.google.com with SMTP id h64-v6so11518593lfi.10 for ; Fri, 07 Sep 2018 02:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ANyHVdrhNp1oj4ND7UmGANeykDRjzuIoxvHYRgv5ElY=; b=caLBK6MULWmSgAZTBYM0yDl32wKYKlBB/Pb/ISd4UrTqWllqGEggfHOItKSLYypX/A zxJM+/Wz1IsMW+2wkm0S8yd+/Dj3QAg5LQ5PKPRokFFQS2RPk1MFHg07/+nbAXeQWqu+ yhxIwdlYAnIg0ku7Ye4xthuU9P5+U7MKLzovwUJZ3tm8NV5LQOZ2SSnytoIjDvv995RV dTqvxXdC/PI3431+UvNzMUse6iI7HAHtqyPVZYV8A6fv57/KLfRzh2lNor4yRR6BJKKz TBhlwFf550ur5JNTjpgjSAVMEA0BvL5M9HY9ZxBaBY1y9MBi0eMsBW0tZqU/1PAqc6V5 b4IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ANyHVdrhNp1oj4ND7UmGANeykDRjzuIoxvHYRgv5ElY=; b=YtJvesnfQLx/WtsUhJKH2UQ1CBEjQ3e4utsxFZry6GfJIriqo6M++/7r5Aw0teuYVp PDqln/VAjnnqo9WsT7/0+z44xOLeXXzEHFzBe5WvWNUDvTglTpU5KLvbK9GnkgdjdwT2 fY32rYx368+Ha080diaKtahDVGvzKnYViKDfZ1xsF+J8e7xyZugzbB3eCghQxoW+xTz9 hWFGE17xB5GDgY0YPIwXzWWQw6nbddYaMrMxTP/4zM6E1LpP52C4mcotJF4iiwiuE1B1 14iMbKR5vXhfMYtkM0Bdn3QAb+4thhKbZPmPtb1IPjY1/zi0BHcVD2mRCIlJl5l3mbSU ps7A== X-Gm-Message-State: APzg51DXoL/dWhH6CJ31UxYsitrA/uaY+qooGq+3tuRwgwOue61qkwbP ZOwr/zxVb1IgXjFAISjTUZ087q6UNsk= X-Received: by 2002:a19:3fcd:: with SMTP id m196-v6mr4426047lfa.11.1536313160924; Fri, 07 Sep 2018 02:39:20 -0700 (PDT) Received: from [192.168.0.126] ([31.173.85.38]) by smtp.gmail.com with ESMTPSA id g133-v6sm1203070lfg.81.2018.09.07.02.39.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 02:39:19 -0700 (PDT) Subject: Re: [PATCH] usb: typec: don't disable sink or source on initialization To: "Angus Ainslie (Purism)" , Heikki Krogerus Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180906192644.24587-1-angus@akkea.ca> From: Sergei Shtylyov Message-ID: <45750b5b-5124-ddb8-c78e-368b2d9ece83@cogentembedded.com> Date: Fri, 7 Sep 2018 12:39:18 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180906192644.24587-1-angus@akkea.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > --- > 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