Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp600431img; Fri, 22 Mar 2019 04:56:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCzD2NeZ+y5Ix266QSoxhsyt1Zm7F7yKnUjEsQYRT04ulstf0JgkhrO25dSjVAu706jy5r X-Received: by 2002:a62:1882:: with SMTP id 124mr8779126pfy.101.1553255798648; Fri, 22 Mar 2019 04:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553255798; cv=none; d=google.com; s=arc-20160816; b=NGI12McnDI2TFS9iX72uNTiDh1OE0Hh3kJJewR+Prtz6GSDdEA4Qk6nuAhriTKAzcL ltrwzx3iuJ51S690atQ+NwGdBz/IwWcDD0jOl0MWR+SeGS+6OgYQ17os9bil3qVlfGhO /SZH4tX4SgYt3+68wVZ4l/JkaVXf+SXiGgdV4vQpe0eiz8ly3u58puDaZe6NbDRwRgQA xxU8okTV/mGptBf7vdiORk7p+lnl3bYVgYi/aWVWmUfXxjqRCnY3CMNs4Feva5fZXCxC T345nmz8yQlFlXygHpeUuLMT7wSsmhSMkbW5+VRcAxVtYYk3X6UiD//wda1WxS0FimoY tupg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+NA+l8H7/JzX5UkHJY/ZfP3KgdL7pb1ghcMTtXdac7s=; b=sXMz/o19ii0BhurVBOVsWgRNdoCk/PXYwB86npKUSdCnMwqDJRT+0AOlzu0WmNjA4d 0vtFGq0CMfmVXTQPz5koQ4K8qCDYbOpm2iHYyybvPFot0+CTyagpxFbSdX0Lzz8nbtHi 2IBV6KczZfs2y4lFPA/JEMDs/SNPHY7k9CF1xfhIQLnOh2N4/uQNj8QBowzZfBdoVNVj /cFXuohqAWFtd0b3czyWQjtVBtgg83zEU+kgZYDajK8TPLUfjcqX1ZJEz925IS3MO56u Id91HWlMu7et0+vi2uIs2hPtbKNTlS6JsNfwjTt2lpHMHyIUHjIfJzkw7++sHpwgjdp7 vODQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="F4/xg/3O"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 94si7044742plc.298.2019.03.22.04.56.23; Fri, 22 Mar 2019 04:56:38 -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=@google.com header.s=20161025 header.b="F4/xg/3O"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733174AbfCVLyY (ORCPT + 99 others); Fri, 22 Mar 2019 07:54:24 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:39412 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733161AbfCVLyS (ORCPT ); Fri, 22 Mar 2019 07:54:18 -0400 Received: by mail-qt1-f196.google.com with SMTP id t28so2110165qte.6 for ; Fri, 22 Mar 2019 04:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+NA+l8H7/JzX5UkHJY/ZfP3KgdL7pb1ghcMTtXdac7s=; b=F4/xg/3Ohxp2rJE95Wf9TWb39GtEhnYItpIHoLIJnpBfXte9bA0UY9wGqVkFYwRZEA Yt8Zx9J88t9WFHyAkMKzCTriwwg04UNpaLjole+cvmDO8E6xzJK1XRKI9uImqNAOvod6 IPlwaRpJTqDLVzPd9fU84sn1WjlaYSNvEp9U01ENAf48YB3weWuBBgiXSvQALYlPyLiQ igzMdsRzO6CJhj4lP4LoaVsf5QmH+ql7ljWStvt7gPxjks/8G+8jGJp45ZIJ6W+Ly8FL LxffAiMFD8WNwYkR+8WjrZ1p6XAzjC/Jugx57l/JTj/t/QBkKWwaXGUXu5zXX7fp5uln WvZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+NA+l8H7/JzX5UkHJY/ZfP3KgdL7pb1ghcMTtXdac7s=; b=JoDDoLhdepmP28Di+I3OnMRJG7sj2sNtreTJxuiSqjE2IrN4AT+awks6I5MEAFTWgh L5KZj8EsUDY+sBuTNPiVj9RrbuWbOHWCgbPG2DoateY6l5JccsBxbO8URwVDY7UTJV00 jpmqN/duIBAxjvqeoxUYo0d1S6hQhLK/KgGlsmQ3SLPJrbmxNIN+k1Et8nV87hMLFcR2 DeG7J14gUgwryx4Z8JRYAZ08aoJVa/qMEANzGbn6FnkZvQ+sGIoA4KhoB0bFAcwWU8pu cef0TlD9FK7tpv1WAEylQwN5hPEn//mTCO/4fo4lnJvWAZ8BQbmrjltXEpAMvHjQ64eF BVHA== X-Gm-Message-State: APjAAAXxRDsLJ2Pipw+jad8s1WvWoDZIqW3qdZQnV2vLHV84Uts5Gcux LBnoIRG74SWUNdxL/A2ExOO+8M6WfbzEss31I0jv2w== X-Received: by 2002:a0c:9e2d:: with SMTP id p45mr7588239qve.28.1553255657681; Fri, 22 Mar 2019 04:54:17 -0700 (PDT) MIME-Version: 1.0 References: <20190319064050.149212-1-kyletso@google.com> <20190319173802.GA31323@roeck-us.net> In-Reply-To: From: Kyle Tso Date: Fri, 22 Mar 2019 19:54:06 +0800 Message-ID: Subject: Re: [PATCH] usb: typec: tcpm: collision avoidance To: Guenter Roeck Cc: Heikki Krogerus , Greg KH , Badhri Jagan Sridharan , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 22, 2019 at 12:51 AM Kyle Tso wrote: > > On Wed, Mar 20, 2019 at 1:38 AM Guenter Roeck wrote: > > > > > static enum tcpm_state tcpm_default_state(struct tcpm_port *port) > > > { > > > if (port->port_type == TYPEC_PORT_DRP) { > > > @@ -600,6 +664,9 @@ static void tcpm_debugfs_exit(const struct tcpm_port *port) { } > > > > > > #endif > > > > > > +static int tcpm_ams_start(struct tcpm_port *port, enum tcpm_ams ams, > > > + bool start); > > > + > > > > Does this have to be a forward declaration ? > > > tcpm_pd_transmit() calls tcpm_ams_start() and tcpm_ams_start() calls > tcpm_pd_transmit() > Since tcpm_ams_start will be divided into two parts, tcpm_pd_transmit no longer needs to call tcpm_ams_start. I will remove the forward declaration in the next version. thanks, Kyle