Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1627123imm; Fri, 7 Sep 2018 03:36:33 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaIMeVf4R+fsB9ebYQCD0RUncPxU6q3BTRUyj/TvP330JxfIqoOgdPSqwGpg5Q9oKp1qbp8 X-Received: by 2002:a17:902:c85:: with SMTP id 5-v6mr7291847plt.141.1536316593633; Fri, 07 Sep 2018 03:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536316593; cv=none; d=google.com; s=arc-20160816; b=QOgRG6HjtVRKvKigt6qVIJDnPPYr2aN44X+hOjcX2HKekFZVg7x3tfifUL+YtcSWKz lvQm6WePXj0rm5npSSkaYTQMJTDGvqCwJMD4z2z3boBBb2V+r/qjQ1W77ljLdF/y+F6S 0nhSEtxcHuiYcPpLoLG/fUaMoQ44smezCgQh1cFnGDooFcQeMjQge0/oJx8/GQ0GWXqt FKW7mBUAct5/Pa1RInnNQsbu43ZPfjoT/GSSDEIvdK7CzuQb+5JZd6vh/3ZWhNRLZNs0 AVESJuvnm2NPt3rGVS7guevUC2FZHgl0ALr2MivnGiSd+ZfQK3RzArDzNqnm84olZlwO tPfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Uy8RkIt4hFMO3zbrRf0chboOBpL3FFunWJpbOc0oGRo=; b=aKGuNutD0joj/QXtCOIMfZQb1BLvSdybRbh0CVUolj6xCYhDctgFLIjAL5TlCGKMwu OL5gprkDTYoMEkOwhD/tG09e5UExfwJdBxQG5tEdz+w/ZBmg7LG/Muw/gsBF8Q26APZ8 e0aV7XsI2RD/2glXenhLmkW3432EsZ98V9HSWbjOC+qhaGQBRPpUN0Il616K/rqi/HL1 qlIjKjuzuKTjCrJxzwCazQjnHR2Bt/O1QmlaVfAywnsYIsQuuTqBFnPZW/DAxEfItVjJ IDP1gLzlWG9K11PGojkuD8lH/mxD7a/iXDYQjaBDF5B+XyRwJ3piKnAWkYXodDII2S8D 8cTg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j38-v6si8211393pgj.613.2018.09.07.03.36.18; Fri, 07 Sep 2018 03:36:33 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728592AbeIGPPC (ORCPT + 99 others); Fri, 7 Sep 2018 11:15:02 -0400 Received: from mga09.intel.com ([134.134.136.24]:52862 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbeIGPPB (ORCPT ); Fri, 7 Sep 2018 11:15:01 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Sep 2018 03:34:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,342,1531810800"; d="scan'208";a="87997650" Received: from kuha.fi.intel.com ([10.237.72.189]) by fmsmga001.fm.intel.com with SMTP; 07 Sep 2018 03:34:39 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Fri, 07 Sep 2018 13:34:38 +0300 Date: Fri, 7 Sep 2018 13:34:38 +0300 From: Heikki Krogerus To: "Angus Ainslie (Purism)" Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Subject: Re: [PATCH] usb: typec: don't disable sink or source on initialization Message-ID: <20180907103438.GI25121@kuha.fi.intel.com> References: <20180906192644.24587-1-angus@akkea.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180906192644.24587-1-angus@akkea.ca> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Guenter On Thu, Sep 06, 2018 at 01:26:44PM -0600, 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 */ > + ret = port->tcpc->set_vbus(port->tcpc, true, true); > + port->vbus_source = true; > + port->vbus_charge = true; > return ret; > } -- heikki