From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751513AbdH0R1W (ORCPT ); Sun, 27 Aug 2017 13:27:22 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:33605 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751248AbdH0R1U (ORCPT ); Sun, 27 Aug 2017 13:27:20 -0400 Date: Sun, 27 Aug 2017 10:27:19 -0700 From: Guenter Roeck To: Badhri Jagan Sridharan Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/11] staging: typec: tcpm: Do not send PING msgs in TCPM Message-ID: <20170827172719.GT22819@roeck-us.net> References: <20170827065200.3305-1-Badhri@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170827065200.3305-1-Badhri@google.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 26, 2017 at 11:52:00PM -0700, Badhri Jagan Sridharan wrote: > PING messages are used to monitor the connect/disconnect. > However, when PD is carried over CC, so this is not required. > > Also, the spec does not clearly say if PD is possible when > Type-c is connected to Type-A/B. So, removing sending > PING messages altogether. > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/tcpm.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c > index a7da609006f5..9e0111dea7c4 100644 > --- a/drivers/staging/typec/tcpm.c > +++ b/drivers/staging/typec/tcpm.c > @@ -2335,14 +2335,11 @@ static void run_state_machine(struct tcpm_port *port) > * - The system is not operating in PD mode > * or > * - Both partners are connected using a Type-C connector > - * XXX How do we know that ? > + * > + * There is no actual need to send PD messages since the local > + * port type-c and the spec does not clearly say whether PD is > + * possible when type-c is connected to Type-A/B > */ > - if (port->pwr_opmode == TYPEC_PWR_MODE_PD && > - !port->op_vsafe5v) { > - tcpm_pd_send_control(port, PD_CTRL_PING); > - tcpm_set_state_cond(port, SRC_READY, > - PD_T_SOURCE_ACTIVITY); > - } > break; > case SRC_WAIT_NEW_CAPABILITIES: > /* Nothing to do... */ > -- > 2.14.1.342.g6490525c54-goog >