Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp50pxb; Wed, 11 Nov 2020 17:44:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEe9uUum1UqNyKuBoFKp480tTq5u4xe/sDohnMP7B2Ej3efMkzMrd8EfcFcj0PjQaHnpow X-Received: by 2002:aa7:cd56:: with SMTP id v22mr2681943edw.245.1605145461490; Wed, 11 Nov 2020 17:44:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605145461; cv=none; d=google.com; s=arc-20160816; b=sptAk4+B0gQ2hlzlYl0/QLsjBOYWUjm9KU4ZaCq0oShhe3xBu+dT6PgbeRL+kyHmoP 8T+2b7BDkAPjWHXaV+1jsvoGXZ3iHPXPppZ3ja9nflN7SCWWZa8aVH3xnRyqsDCrKOvx l9XiIooYkAQiiv0o+wC9vHtbi/m6Ft6O1gFWOQ42r+5uerul1g/5V0WqZjbykCjGvEPD xz800NiivS44T66xk7PnwlyqwnTGaYtpmz1V19TNsdTaeHM4JVyV5UVNkSq+s62er+ul N22IZRbb8+PdyYmoklFbHOyGMp1e3MeSHN2jmgWSmflUhgmviZhVrcizg5S6Urm8SyCM TV6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=N7Lf2zyWERPVdu1htC4rXtjvkvXPb9GfV1THCOYFuzQ=; b=GK6/ML4WKIbkfFTCzjpe54Od0QWDnF8zjnyoYH8EDI5eXU9rMQxglsMRQZsoO7VZDz 53+2a5xGLoS3QeO9yctRSECHV0EXpyxFJ2TddjaIekMIRjY3bQN24RH0yQiCnK0jNJ+S OQ6mqCQY0r8PBO3hbUkTigQINh5ZhVQNe8Q0Q/j3xVNJKlc8cyq298CWsuaAsm49XyYF 3tC8wbcENZT+WUZODa+lG8+YyAP6ip7stQmtTk4qiPvLfveRT3oy5ktSX5AMb7jmoset +YF4q7fX/ypMn9Pr1CJYdpibrvFIRWx2p3RpEgxNDXmpHjKV5lo8fuOW4PN0vCDb2Qtx 9F5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XH00HgnQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j9si2897381edp.113.2020.11.11.17.43.58; Wed, 11 Nov 2020 17:44:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XH00HgnQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729706AbgKLBl1 (ORCPT + 99 others); Wed, 11 Nov 2020 20:41:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728235AbgKLBXy (ORCPT ); Wed, 11 Nov 2020 20:23:54 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF149C0613D4 for ; Wed, 11 Nov 2020 17:23:53 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id q5so2965242pfk.6 for ; Wed, 11 Nov 2020 17:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=N7Lf2zyWERPVdu1htC4rXtjvkvXPb9GfV1THCOYFuzQ=; b=XH00HgnQSvMCsYKU8m1dMFSTUu9rPajGK59TSV5XwegjFuF/OFM80jpJKt9b4w8HtO DAEoq/eI0pSDbHL5YiiGx87azE4m2Kcm+iXSVBeegTQIX3hxH1OdMUpggeVIy1J4BuoC Gns43J9xqLOkFd9XvKJIUMopKQO+xfIkJwLns= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=N7Lf2zyWERPVdu1htC4rXtjvkvXPb9GfV1THCOYFuzQ=; b=Xu7T4rP0EbE2G16wh+kR3XWPoEpS2o8eYia8TJhml1KZW7WsruWhXmQ0pxE6o+mNuz Ozi6BMF/Q2LwQw2CnB7FShafjdx/UTusAR0HPVUn+GyBfSOSbJKDxI0ZaibE/JEIf6B9 QIb7CKIVizl//OGGGKauioVazX2aUaCBIXVio5ZbwnrnZS8nY62wK9+lc8fsJuAF/m2m CzpCBXQWlb/7g/L6bX+SSEDMrHAnoh9/xDsKTzPy6pqrMNdhJWLTEnEE2zT6PMkTDvnp KqQWYdipJvrw9jwyPOZuZ3o0Zui51B2HTX2WTKlpq294vxRvOCx1qN3JsXKh+A6feNTd xZSw== X-Gm-Message-State: AOAM5326kZe1N970HE6ziLHrzwBEAC+WgcE6z23Ypb4iS9NrsdZkYWID ZAvyXV0Cnjz0ZIGm7aUjHuZnlTHlYwyxiA== X-Received: by 2002:a65:508a:: with SMTP id r10mr24784979pgp.307.1605144233091; Wed, 11 Nov 2020 17:23:53 -0800 (PST) Received: from pmalani2.mtv.corp.google.com ([2620:15c:202:201:a28c:fdff:fef0:49dd]) by smtp.gmail.com with ESMTPSA id k25sm4057227pfi.42.2020.11.11.17.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 17:23:52 -0800 (PST) From: Prashant Malani To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com, enric.balletbo@collabora.com Cc: Prashant Malani , Benson Leung , Guenter Roeck Subject: [PATCH 0/3] platform/chrome: cros_ec_typec: Add plug and plug altmodes Date: Wed, 11 Nov 2020 17:23:25 -0800 Message-Id: <20201112012329.1364975-1-pmalani@chromium.org> X-Mailer: git-send-email 2.29.2.222.g5d2a92d10f8-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series add plug registration support to the cros-ec-typec driver. It also adds support for registering alternate modes for the registered plug. These features utilize the API provided by the Type C connector class framework. The first patch adds support to the connector class framework for the number_of_alternate_modes attribute (along with the relevant ABI documentation). The next two patches add plug registration, and then altmode registration for the plugs. The latter of these two patches utilizes the new function for plug number_of_alternate_modes introduced in the first patch. This series is based on top of the following branch and other patch series (applied in the order specified): - Branch: chrome-platform for-next [1], which is currently set to the "Linux 5.10-rc1" tag. - cros-ec-typec: Patch series to register PD identity information + partner altmodes[2] - cros-ec-typec: Patch series to register cable[3] - cros-ec-typec: Patch series to add partner number_of_altmodes[4] [1]: https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git/log/?h=for-next [2]: https://lore.kernel.org/lkml/20201029222738.482366-1-pmalani@chromium.org/ [3]: https://lore.kernel.org/lkml/20201106184104.939284-1-pmalani@chromium.org/ [4]: https://lore.kernel.org/lkml/20201110061535.2163599-1-pmalani@chromium.org/ Prashant Malani (3): usb: typec: Add plug num_altmodes sysfs attr platform/chrome: cros_ec_typec: Register SOP' cable plug platform/chrome: cros_ec_typec: Register plug altmodes Documentation/ABI/testing/sysfs-class-typec | 9 +++ drivers/platform/chrome/cros_ec_typec.c | 85 ++++++++++++++++----- drivers/usb/typec/class.c | 77 ++++++++++++++++++- include/linux/usb/typec.h | 1 + 4 files changed, 151 insertions(+), 21 deletions(-) -- 2.29.2.222.g5d2a92d10f8-goog