Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp737131imm; Fri, 8 Jun 2018 04:33:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJgzbsOkd3rooTDuVNgiV9d5QEtGp0XO9NQGCRpTg2MXJBNJ3PK/unIXlI9m6mT/UNdh2Q9 X-Received: by 2002:a65:43cb:: with SMTP id n11-v6mr4916602pgp.234.1528457620336; Fri, 08 Jun 2018 04:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528457620; cv=none; d=google.com; s=arc-20160816; b=pMrc+fUmAc2bQ1N56S5/1HPj8FSZuQP8ZPSrctFAlIW3GnwvLbM4HFd3DdZu76hJm/ BGrJnQyCb6NLqx7CU4/FMEy7w7k8Lbw4yeOknT3xhdVtID5hMspnQRU9aUNgw/WgdUiL pGtSUMhNLP9WqCTPGvJSSy6Mfg/QcJbxJTBW9+tohNT8NidV3kkaipwOygeui6ejcBew Xy7BEeANJtWhliipR71qUiHkSg2mJ9BbMXbz/6/H0VUCN2oAqa7sHsPFJ4121sp5G145 7HHb5Bhi6Wpax7F1CGtO9SaalbxF5gT0pxmc99X9zfiQd/l7CqO+8NwI2ilWSWAMfcPd tg0g== 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=DaLb4YAfuw4M0hGY+Np3Otz3dPSyOWtAK+K6lN1spWw=; b=MW9WjyPLJo+TqBFQbVp+4kQgDaefdn64jbKw+seUFIeu91/u2ss8wQWXRgHxmXa5L6 AjIJuh7QHtRflCIv5BXCyhz4HM1/4mxltUStJ7Xc2aQmDwspxliX84G7ZPJJFuEvCWwe mKQfaBV6PIOpmMb10Fx1vn3bPI+lMeyFhu1mDdTgxgl+LK9EbXGro6+jYHL5ipUqHB5k GODJi1JVCLbnjIIRAv1SafkyGYceY4jOvHl/Q+ep8E+j9Q3PUIqXjW2qWqC3OUEE/uR+ aPZOTEQYTaWKZwdWDOLhVuRSU4oXP1rvHS44Hr3TNTo+M/gh4jPRs6oGxMZbZj9nUavv U3Vw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13-v6si10614778pgu.207.2018.06.08.04.33.26; Fri, 08 Jun 2018 04:33:40 -0700 (PDT) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729AbeFHL3p (ORCPT + 99 others); Fri, 8 Jun 2018 07:29:45 -0400 Received: from mga17.intel.com ([192.55.52.151]:32416 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265AbeFHL3o (ORCPT ); Fri, 8 Jun 2018 07:29:44 -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 fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jun 2018 04:29:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,490,1520924400"; d="scan'208";a="62388977" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 08 Jun 2018 04:29:42 -0700 From: Heikki Krogerus To: Guenter Roeck , Hans de Goede Cc: Greg Kroah-Hartman , Jun Li , Mats Karrman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v4 0/8] usb: typec: Support for Alternate Modes Date: Fri, 8 Jun 2018 14:29:33 +0300 Message-Id: <20180608112941.26332-1-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is the fourth (and hopefully last RFC) of my proposal for more complete alternate mode support. In this version the main difference compared to the previous versions is the displayport alt mode driver. For those who have no idea what is this about, the idea is to add a bus type for the USB-C alternate modes. All alternate modes, for example DisplayPort, require specific communication, so we will need separate driver for every alternate mode. For more details please read the cover letter of the previous version here: https://lkml.org/lkml/2018/5/11/323 It took some time for me to get permission to publish the displayport alt mode driver. Sorry for the delay. I was actually hoping that I could include changes also to the drm subsystem already now, but it ended up being more complicated than I first though, and I quite simply don't have time for that, so let's just start with these. Heikki Krogerus (8): usb: pd: include kernel.h usb: typec: helper for checking cable plug orientation usb: typec: mux: Get the mux identifier from function parameter usb: typec: Register a device for every mode usb: typec: Bus type for alternate modes usb: typec: Add driver for DisplayPort alternate mode usb: typec: pi3usb30532: Start using generic state values usb: typec: tcpm: Support for Alternate Modes Documentation/ABI/obsolete/sysfs-class-typec | 48 ++ Documentation/ABI/testing/sysfs-bus-typec | 51 ++ Documentation/ABI/testing/sysfs-class-typec | 62 +- .../testing/sysfs-driver-typec-displayport | 49 ++ Documentation/driver-api/usb/typec_bus.rst | 136 +++++ MAINTAINERS | 13 +- drivers/usb/typec/Kconfig | 2 + drivers/usb/typec/Makefile | 3 +- drivers/usb/typec/altmodes/Kconfig | 14 + drivers/usb/typec/altmodes/Makefile | 2 + drivers/usb/typec/altmodes/displayport.c | 543 ++++++++++++++++++ drivers/usb/typec/bus.c | 401 +++++++++++++ drivers/usb/typec/bus.h | 38 ++ drivers/usb/typec/class.c | 485 ++++++++++------ drivers/usb/typec/mux.c | 6 +- drivers/usb/typec/mux/pi3usb30532.c | 15 +- drivers/usb/typec/tcpm.c | 184 ++++-- include/linux/mod_devicetable.h | 15 + include/linux/usb/pd.h | 1 + include/linux/usb/tcpm.h | 9 - include/linux/usb/typec.h | 52 +- include/linux/usb/typec_altmode.h | 160 ++++++ include/linux/usb/typec_dp.h | 70 +++ include/linux/usb/typec_mux.h | 2 +- scripts/mod/devicetable-offsets.c | 4 + scripts/mod/file2alias.c | 13 + 26 files changed, 2053 insertions(+), 325 deletions(-) create mode 100644 Documentation/ABI/obsolete/sysfs-class-typec create mode 100644 Documentation/ABI/testing/sysfs-bus-typec create mode 100644 Documentation/ABI/testing/sysfs-driver-typec-displayport create mode 100644 Documentation/driver-api/usb/typec_bus.rst create mode 100644 drivers/usb/typec/altmodes/Kconfig create mode 100644 drivers/usb/typec/altmodes/Makefile create mode 100644 drivers/usb/typec/altmodes/displayport.c create mode 100644 drivers/usb/typec/bus.c create mode 100644 drivers/usb/typec/bus.h create mode 100644 include/linux/usb/typec_altmode.h create mode 100644 include/linux/usb/typec_dp.h -- 2.17.1