From patchwork Wed Feb 13 07:45:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 10809303 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 606BA139A for ; Wed, 13 Feb 2019 07:46:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 515622C518 for ; Wed, 13 Feb 2019 07:46:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4563F2C78A; Wed, 13 Feb 2019 07:46:57 +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 CD45E2C518 for ; Wed, 13 Feb 2019 07:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387724AbfBMHqB (ORCPT ); Wed, 13 Feb 2019 02:46:01 -0500 Received: from mga09.intel.com ([134.134.136.24]:39706 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728291AbfBMHqA (ORCPT ); Wed, 13 Feb 2019 02:46:00 -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 orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2019 23:45:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,365,1544515200"; d="scan'208";a="146426015" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 12 Feb 2019 23:45:57 -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 v3 0/9] device connection: Add support for device graphs Date: Wed, 13 Feb 2019 10:45:48 +0300 Message-Id: <20190213074557.66028-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 third version of my proposal to add device graph parsing to the device connection API. There was only one problem reported in v2 by Jun - kernel-doc entry was missing for the new fwnode member in struct usb_role_switch_desc - and it's now fixed. The second version of the series: https://lkml.org/lkml/2019/1/30/622 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 | 2 + include/linux/usb/typec_mux.h | 3 +- 8 files changed, 196 insertions(+), 40 deletions(-)