From patchwork Thu Sep 20 11:23:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 10607503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D99B112B for ; Thu, 20 Sep 2018 11:24:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E2552CEBD for ; Thu, 20 Sep 2018 11:24:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42BD72CF0F; Thu, 20 Sep 2018 11:24:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0C722CEBD for ; Thu, 20 Sep 2018 11:24:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732500AbeITRHG (ORCPT ); Thu, 20 Sep 2018 13:07:06 -0400 Received: from mga11.intel.com ([192.55.52.93]:11224 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727986AbeITRHG (ORCPT ); Thu, 20 Sep 2018 13:07:06 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Sep 2018 04:24:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,398,1531810800"; d="scan'208";a="91755736" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 20 Sep 2018 04:24:04 -0700 From: Heikki Krogerus To: Greg Kroah-Hartman Cc: Guenter Roeck , Hans de Goede , Adam Thomson , linux-usb@vger.kernel.org Subject: [PATCH 08/12] platform: x86: intel_cht_int33fe: Add connections for the USB Type-C port Date: Thu, 20 Sep 2018 14:23:43 +0300 Message-Id: <20180920112347.69773-9-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180920112347.69773-1-heikki.krogerus@linux.intel.com> References: <20180920112347.69773-1-heikki.krogerus@linux.intel.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Assigning the mux to the USB Type-C port on top of fusb302. That will prepare this driver for the change in the USB Type-C class code, where the class driver will assume the muxes to be always assigned to the ports and not the controllers. Once the USB Type-C class driver has been updated, the connections between the mux and fusb302 can be dropped. Acked-by: Andy Shevchenko Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus --- drivers/platform/x86/intel_cht_int33fe.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c index 424064187124..419ce8c8ffb5 100644 --- a/drivers/platform/x86/intel_cht_int33fe.c +++ b/drivers/platform/x86/intel_cht_int33fe.c @@ -34,7 +34,7 @@ struct cht_int33fe_data { struct i2c_client *fusb302; struct i2c_client *pi3usb30532; /* Contain a list-head must be per device */ - struct device_connection connections[5]; + struct device_connection connections[8]; }; /* @@ -187,6 +187,16 @@ static int cht_int33fe_probe(struct i2c_client *client) data->connections[3].endpoint[1] = "intel_xhci_usb_sw-role-switch"; data->connections[3].id = "usb-role-switch"; + data->connections[4].endpoint[0] = "port0"; + data->connections[4].endpoint[1] = "i2c-pi3usb30532"; + data->connections[4].id = "typec-switch"; + data->connections[5].endpoint[0] = "port0"; + data->connections[5].endpoint[1] = "i2c-pi3usb30532"; + data->connections[5].id = "typec-mux"; + data->connections[6].endpoint[0] = "port0"; + data->connections[6].endpoint[1] = "i2c-pi3usb30532"; + data->connections[6].id = "idff01m01"; + device_connections_add(data->connections); memset(&board_info, 0, sizeof(board_info));