Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp143061lqs; Mon, 4 Mar 2024 19:00:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV37BMJbJarLfeSyYUO5GjV8tQMajpWHh5nTzLaOGnxvPMR+Gd2OO5A3dBXPN5WdcIRCAK9HRaf9yqYhJldwk+Pjnjg8iBMpBZ9kRxAgw== X-Google-Smtp-Source: AGHT+IHzQilaYpg1cG0HNTu3+4/X8JF+hUF2bwxFwROSQKBVBCG7Qbu98vhN0c+fszH/bh+pr43G X-Received: by 2002:a05:6a20:9326:b0:1a1:4c8f:fdc0 with SMTP id r38-20020a056a20932600b001a14c8ffdc0mr415908pzh.43.1709607617033; Mon, 04 Mar 2024 19:00:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709607617; cv=pass; d=google.com; s=arc-20160816; b=rFG1co35tHufo2a1Rxeo1fbdn6vvmvqQGrbcpiTmpAMJoVAx8J1ygm/od4TNkSTud7 CXoZSKlc8YS9gqTnV3heSr3DRmepPkfaOQ9ojo253kJbfKs7gWm3tudpAzi/jJm4slT4 Fe+9Jw4Dlu/5eSsVeoXkpXo4YQimSfvflM7NrFGLrZRnu6/LxvapyhiBkEVNTTJGOVyz YfyKAcPNBmz0xFujQ3tc4IXpEUDj4CJJ279gLomYGWgE676rVXcX+c1D/4DbPXwjqn9b smJ+m1A5UeVk98S0I5x/chm4ISndgIqiSvA5bIO7n/he1hjtFodD5nT8jaUnes8De7KT jUgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=4w24FvPZfR/PRRHr0+XjzHX4GZ+6wb3j1dS/myLXi1M=; fh=3O7j7/w8GPHxYXV8IFxKpwuPCXb5dsOrhSCU2RjGSSU=; b=u8LSCzucj0GNiHcqu8xd3lbkAgQSqGerN+n+oRQ5VZJdzInc8Yn6IKEJW9dBrCtHJM /pCHC9k09pgp/avUV2N08STrCknw49EtSv57w6KYIp2rq9+yoy8n5JTsWg/3e683EZv+ roBG1isyC7SG23B3LM/dey18pTmfKpo1EegsiRElhSdQV16EQ7VCV24iRq6QFqOrbQey R7liyEjECDwSTdbXrhJQ8FrPLnEHN4LOGE1TfUE2DWSgcXgj5o95dl0q4rdjDrsb1miL SUzITrXytIHfcG5GJYlf2eYderUE5Sfp4KMA9xYet6L/7KFS+JX35In5TqRUxS35F3dr /IIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=jVwP7x2I; arc=pass (i=1 spf=pass spfdomain=flex--jthies.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-91588-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w26-20020aa7859a000000b006e52f0b49basi9166093pfn.209.2024.03.04.19.00.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 19:00:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91588-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=jVwP7x2I; arc=pass (i=1 spf=pass spfdomain=flex--jthies.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-91588-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E108E28439F for ; Tue, 5 Mar 2024 02:58:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3FE529428; Tue, 5 Mar 2024 02:58:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jVwP7x2I" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A514C18046 for ; Tue, 5 Mar 2024 02:58:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709607503; cv=none; b=cOGba+eUV8Ry6dQ9S21Q/V3232gqeKViPu4eeDj/siSiVwEgqjYuZA0D2mHbCcNoo4K9t9dMBXQs90OqQ3rdNwo/oQY5e6kWJ2OocoheGKGKj9iw4DG4Se1IvOunhvnD9koKs2J9RpUz4bUMeqzOEnkrbOaIlJJu81An9cjFAzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709607503; c=relaxed/simple; bh=oNftph5EzpMR8yP1faN1LwNXcXXa0MWKbcv0UYRquWw=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=ozgFJzfiZRuojUMXDvltAec4mWIqe//P2ACHG6zJJk+tY6G3wEN4U2jX+/hyfd5A+pWOqCzMWDDijFf1aEHOx3G/P8TQbBvnOFj9u3nmftojr6oxjVBDMihWtG/KsyUqtOTEJWRX42emp28/mAYL6f2gWRTXXV8ED1wZJrrc+UY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jthies.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=jVwP7x2I; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jthies.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-608ab197437so81160417b3.1 for ; Mon, 04 Mar 2024 18:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709607500; x=1710212300; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=4w24FvPZfR/PRRHr0+XjzHX4GZ+6wb3j1dS/myLXi1M=; b=jVwP7x2I1gCv06CyQYZQ+ldANjDYpKJAsM3S70EYGlzm6grjJjutVhgv3HcwP/gdUZ of5zHcvqY8zl/zf8u66v8QqzFs8HP43AmdmQ1tqKvQKgVQbVwg0AHsLZBAAE21Iy6RwK kOS3ElsmDatnoZeu20HJ/IUoH+RUK9vGRUk2yMtRL3cCaqlOWpWRgNGGk1mSnsApDsb2 z/cuqkX00lcjHPfbGXf19JYUnyQ6mGYVDKHeP5wiBEaiGlmt3GGUZdJGU5OZIGV2YkSc ttFlJysdsQf8FtSDWkiC9/cmCl58W3Pd3WyWKIKmDvg3hCGYHF06s89+skEgIKhdKI3/ JnEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709607500; x=1710212300; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=4w24FvPZfR/PRRHr0+XjzHX4GZ+6wb3j1dS/myLXi1M=; b=DTO9eSBHJQkPB25czIJ1lsjxq8EG1KnCIQTpp39upCrHLNK77um0H2e7+juJIJ6js5 q3/2b6nNZ1bmeDtht4dHuFb/RgX3RWin5riXyFL1DDCVfYSJ+ey8NPNalAtoqqjydnuJ s/t0ZG0SuIMPuxxZoA6GKGHQKvj6uM9XiWDGR0HFj/bPbR0sVtCnU1RGs7m5qHyBP33Z bVEl1zoLOc1RMEua/UdAJcAw7iY0xx0gLOtiwUun7T5oLcnQwItCDLELVel0+5DfFHQX dMpoXut6rSpUMFDhz51qnb3Jbdzao5EF66GZhwI7mHGfvE5l9nabPE3ulOB8ObGfRTfv Z2KQ== X-Forwarded-Encrypted: i=1; AJvYcCVkoJRa6sQP/V36hpLDF52rf/a+ICTwfJj2btLmXoBfblpk3bX7OoO9AR3qmL3/stEOqyeiqusjzva9p+jJ7ORIsYMPQeRKvyvskt4Z X-Gm-Message-State: AOJu0Yx2BAnzIVEpJOOn5goUAN5ZJiGcA9W/dIVaEDaxASBN+xYYP2Mi aYrsQmkQ0Pr3jWaOzj3nwmp4Vhe5oxVNZjozV+uk39LeHJrMTxV2oh9NJr2H/4nuPW1AbM8ReRj ykw== X-Received: from jthies.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:23db]) (user=jthies job=sendgmr) by 2002:a05:690c:e18:b0:609:247a:bdc5 with SMTP id cp24-20020a05690c0e1800b00609247abdc5mr3070607ywb.4.1709607500787; Mon, 04 Mar 2024 18:58:20 -0800 (PST) Date: Tue, 5 Mar 2024 02:58:00 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.rc1.240.g4c46232300-goog Message-ID: <20240305025804.1290919-1-jthies@google.com> Subject: [PATCH v4 0/4] usb: typec: ucsi: Expand SOP/SOP' Discovery From: Jameson Thies To: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org Cc: jthies@google.com, pmalani@chromium.org, bleung@google.com, abhishekpandit@chromium.org, andersson@kernel.org, dmitry.baryshkov@linaro.org, fabrice.gasnier@foss.st.com, gregkh@linuxfoundation.org, hdegoede@redhat.com, neil.armstrong@linaro.org, rajaram.regupathy@intel.com, saranya.gopal@intel.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Hi Heikki, This patch series expands support for partner and cable discover in the UCSI driver. There are a few pieces here. 1. Some cleanup of the GET_CABLE_PROP definitions in ucsi.h. 2. Cable discovery and registration with the USB Type-C connector class. 3. Partner/Cable identity registration with the USB Type-C connector class. 4. SOP' alternate mode registration with the USB-C connector class using a cable plug. These have been tested on a the usb-testing branch merged with a chromeOS 6.8-rc2 kernel. Let me know if you have any questions. Thanks, Jameson Changes in v4: - Cleaned up redundent ucsi_send_command calls for discovering identity. Changes in v3: - Fixed CC stable and email threading issue. Changes in v2: - Re-ordered memset call and null assignment when unregistering partners and cables. - Supports registering partner and cable identity with UCSI versions before v2.0. - Shortened lines to within 80 characters with the exception of two error log lines with three indentations. - Tested on usb-testing branch merged with chromeOS 6.8-rc2 kernel. Jameson Thies (4): usb: typec: ucsi: Clean up UCSI_CABLE_PROP macros usb: typec: ucsi: Register cables based on GET_CABLE_PROPERTY usb: typec: ucsi: Register SOP/SOP' Discover Identity Responses usb: typec: ucsi: Register SOP' alternate modes with cable plug drivers/usb/typec/ucsi/ucsi.c | 245 ++++++++++++++++++++++++++++++++++ drivers/usb/typec/ucsi/ucsi.h | 40 +++++- 2 files changed, 283 insertions(+), 2 deletions(-) base-commit: a14e6fd1b67799da7da9cc344023bd16aaf0d17d -- 2.44.0.rc1.240.g4c46232300-goog