From patchwork Wed Jan 30 16:02:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 10788901 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 EB17E1390 for ; Wed, 30 Jan 2019 16:04:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8F3D2F412 for ; Wed, 30 Jan 2019 16:04:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6BFE2FF2A; Wed, 30 Jan 2019 16:04:16 +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 7B8892A2D3 for ; Wed, 30 Jan 2019 16:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731814AbfA3QDD (ORCPT ); Wed, 30 Jan 2019 11:03:03 -0500 Received: from mga02.intel.com ([134.134.136.20]:60152 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728943AbfA3QDD (ORCPT ); Wed, 30 Jan 2019 11:03:03 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2019 08:03:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,541,1539673200"; d="scan'208";a="142760833" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 30 Jan 2019 08:03:00 -0800 From: Heikki Krogerus To: Greg Kroah-Hartman Cc: Andy Shevchenko , Chen Yu , Jun Li , Hans de Goede , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/9] device connection: Add support for device graphs Date: Wed, 30 Jan 2019 19:02:50 +0300 Message-Id: <20190130160259.46919-1-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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 Hi, This is the second version of this series. On top the two code style improvements requested by Andy, I also renamed the connection identifiers used with the USB Type-C muxes for something that I felt are better, especially after we start using them to name reference device properties in fwnodes. That's why the first patch is now split in two, 1/9 and 3/9. Hans! Please note that there is no functional change. The alt mode device is still getting a handle to the mux, just like before. That was actually happening also in the first version of the series. The commit message from v1: This series adds support for OF and ACPI device graph parsing to the device connection API. Handling the graph is straightforward, but because I'm adding that fwnode member to struct device_connection, I had to make sure all the existing users consider it. The plan is to only support matching with fwnode in the future, so no more device name matching. The software fwnodes that we now have in kernel should make that possible, once we add support for references to them. The original RFC: https://lkml.org/lkml/2018/10/24/619 thanks, Heikki Krogerus (9): platform/x86: intel_cht_int33fe: Prepare for better mux naming scheme usb: typec: Rationalize the API for the muxes platform/x86: intel_cht_int33fe: Remove old style mux connections device connection: Add fwnode member to struct device_connection usb: typec: mux: Find the muxes by also matching against the device node usb: roles: Find the muxes by also matching against the device node usb: typec: Find the ports by also matching against the device node device connection: Prepare support for firmware described connections device connection: Find device connections also from device graphs drivers/base/devcon.c | 62 ++++++++++++++- drivers/platform/x86/intel_cht_int33fe.c | 15 ++-- drivers/usb/roles/class.c | 21 +++++- drivers/usb/typec/class.c | 31 ++++++-- drivers/usb/typec/mux.c | 96 ++++++++++++++++++++---- include/linux/device.h | 6 ++ include/linux/usb/role.h | 1 + include/linux/usb/typec_mux.h | 3 +- 8 files changed, 195 insertions(+), 40 deletions(-) Reviewed-by: Hans de Goede Acked-by: Hans de Goede Reviewed-by: Jun Li Tested-by: Jun Li