Received: by 10.223.185.116 with SMTP id b49csp6301628wrg; Wed, 28 Feb 2018 07:13:51 -0800 (PST) X-Google-Smtp-Source: AH8x227kyyGH2LD3wPixV2OQGLEm3Ox/s/cwwkTnJOKwCdO2ZN2YyHFz5L05/D2VTC/DthopLT8o X-Received: by 10.101.67.198 with SMTP id n6mr14536786pgp.150.1519830831153; Wed, 28 Feb 2018 07:13:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519830831; cv=none; d=google.com; s=arc-20160816; b=02IMaoZ3S1Hnf8ZjCXXDE1rHuVxSGKkZAOZPWL2M9nYWfGQBDplNQAM7sGUHX+199p 6ITZ2EEr0M44qv11+0FGZke9+4NBnFL8rsDw+uoDCKgR+eIRpEvRFXRbifmq5PBXl4UH SkMURi6ABDqmZ9PjmHjXcTDjR8sk38y7CeAYAhr1qGJG+H6E1O9mTQlCmJ8HaESjqGDm CYh+ArVZLAFTPcK4jz5isDOx8EA3jKyDfI2uBSI4Ft349MRB4c0XlH8rL+x/ShbQ0l0E JPVJW2iJ0AlK2XyoUgYyXoQ5gmFPlOvPcsbxyYZQlZ5YXomjNeTNSMcXXjZ4cBJVSF+f cjIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=9IreIH8ocOTYBMHrmHQJF1VdQdqx9bdt4Lm9xolu2Pk=; b=vu/TVNc4o6NaDD9bx3cmGwuHOwwf4haZfSkedNCrvpE3gYRiTry//0mtzM8u0tD6xw VEz8YEdBWEBxBrlRSLsSD47t8q7u30qR+E/5/buJnj+BVt6GFsKSrpA8gEbvhdBu111y YH4vIlAG0AQrlVzObkRM7WdMHx2gGosw8EWlKc7oVJUPrOFfk+L/DO2DEPL1NjAidcMF QPyLKmZmDCIuZ8JquMVCPGLHMiUvRrNe64o7WQMRN5UE/gFVK3+tcfY6iigVhnjYNgCT ptGupTN/FZnu+cWqk+PkhHUDWn85kahYm0fNhBM6uF2Hnrhv79jaCm5ys3ruWqXochZZ DjFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h67si1391236pfj.11.2018.02.28.07.13.36; Wed, 28 Feb 2018 07:13:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932363AbeB1PH5 (ORCPT + 99 others); Wed, 28 Feb 2018 10:07:57 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43264 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932340AbeB1PHy (ORCPT ); Wed, 28 Feb 2018 10:07:54 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4F4CB40FB650; Wed, 28 Feb 2018 15:07:53 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-106.ams2.redhat.com [10.36.116.106]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6470C9C04B; Wed, 28 Feb 2018 15:07:51 +0000 (UTC) From: Hans de Goede To: Darren Hart , Andy Shevchenko , MyungJoo Ham , Chanwoo Choi , Mathias Nyman , Heikki Krogerus , Greg Kroah-Hartman , Guenter Roeck Cc: Hans de Goede , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH v5 00/12] USB Type-C device-connection, mux and switch support Date: Wed, 28 Feb 2018 16:07:37 +0100 Message-Id: <20180228150749.26831-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 28 Feb 2018 15:07:53 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 28 Feb 2018 15:07:53 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'hdegoede@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, Here is version 5 of Heikki's and my USB Type-C device-connection, mux and switch support series. Versions 2 - 5 bring various small code and style fixes based on review (no major changes). Here is the original cover-letter of v1: Some devices with an USB Type-C connector have a bunch of muxes behind that connector which need to be controlled by the kernel (rather then having them controlled by firmware as on most devices). Quite a while back I submitted a patch-series to tie together these muxes and the Type-C Port Manager (tcpm) code, using the then new drivers/mux framework. But the way I used the mux framework went against what it was designed for, so in the end that series got nowhere. Heikki Krogerus from Intel, who maintains the USB TYPEC subsystem, has recently been working on solving the same problem for some boards he is doing hardware-enablement for. Heikki has come up with a number of infrastructure patches for this. The first one is a new device-connection framework. This solves the problem of describing non bus device-links on x86 in what in my experience with this problematic area is a really nice simple, clean and *generic* way. This could for example in the near future also replace the custom lookup code in the pwm subsys and the custom pwm_add_table() / pwm_remove_table() functions. The other 3 patches add a framework for the different type of Type-C / USB "muxes". Heikki and I have gone through a number of iterations of these patches together and we believe these are now ready for merging. Since merging infrastructure patches without users is not done and Heikki's own use-case for these is not yet ready for merging, the rest of this series consists of patches by me to make the Type-C connector found on some Cherry Trail devices (finally) be able to actually work as an USB port and not just a charge port. The last patch uses the new usb-role-switch framework to also do proper devcie / host switching on CHT devices with a USB micro AB connector. This is also a big feature for CHT users, because before this they had to do a reboot to get an OTG-host cable recognized (on some devices). Part of this series is an usb-role-switch driver for the role-switch found inside the xhci controller on e.g. CHT devices, this is currently implemented as the generic xhci controller instantiating a platform child-device for this, since this really is a separate chunk of HW which happens to sit in the XHCI mmio space. This approach may not be universally liked, given that in this new series the role-switch driver is much smaller and does not have any external deps anymore we could just integrate it into the xhci code if that is preferred. About merging this series (once everything is reviewed, etc.), there are quite some interdependencies in it esp. a lot of the patches depend on the first patch. Luckily patches 1-10 all apply to subsystems which are maintained by Greg (most to the USB subsys). Which just leaves patches 11 and 12 once 1-10 are merged. Greg, can you create an immutable branch for the platform/x86 and extcon maintainers to merge once this is done? Regards, Hans