Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825AbdH1RYk (ORCPT ); Mon, 28 Aug 2017 13:24:40 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:35923 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbdH1RYM (ORCPT ); Mon, 28 Aug 2017 13:24:12 -0400 X-Google-Smtp-Source: ADKCNb4xlnJebmTP/hIszWbQOjamyv0A1SuogNuaiqZV462gzgcDriDJeKp1qOoEy96AFc6CVz1qNA== From: Badhri Jagan Sridharan X-Google-Original-From: Badhri Jagan Sridharan To: Greg Kroah-Hartman , Guenter Roeck Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Badhri Jagan Sridharan Subject: [PATCH 10/11 v3] staging: typec: tcpm: Do not send PING msgs in TCPM Date: Mon, 28 Aug 2017 10:23:21 -0700 Message-Id: <20170828172322.7166-10-Badhri@google.com> X-Mailer: git-send-email 2.14.1.342.g6490525c54-goog In-Reply-To: <20170828172322.7166-1-Badhri@google.com> References: <20170828172322.7166-1-Badhri@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1677 Lines: 46 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 --- Changelog since previous version: - Only one previous version of the patch was sent. Numbering this V3 instead of V2 to keep the sequence number in sync with the rest of the patches in the patch list. - added Reviewed-by: Guenter Roeck - fixed version/sequence numbers 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