Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp693521lqo; Fri, 10 May 2024 11:43:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9hOQtr5cAf5RsswzaEhzAsg6FDdsqhqDqsJHhKG+dLIw+qLfBkxsmP5e+L88KP7Hq1sCROrcOYohfG8lqqXPxXme1U4reA4G9VjPHNQ== X-Google-Smtp-Source: AGHT+IEbldnwwpy1PL96MCKEr623WeIL1FE3Qnh5XTue2igC0zYMJgo8iv4nwhKMvCwmKrQ+lNiS X-Received: by 2002:a05:6870:f103:b0:23c:6025:a9ef with SMTP id 586e51a60fabf-24172c5d888mr3746210fac.57.1715366621896; Fri, 10 May 2024 11:43:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715366621; cv=pass; d=google.com; s=arc-20160816; b=bt69E9BDx3cK0Ss5eEFHYQ8llyc3SE2x4aioFyyDmmQSalEsCG4dMInNtFubYQU9h4 pcFXoXg19ryqvcO1rP/rsfypG/j+gf0ckYCFuqm6ujcYC/5zcCNj9jvh/oHhZCGVEnfx 5D4CjTyxBlH1dvrR2h342UKKnWsnKmCtIrDysSyK5g4CdmgbIGh7Dj7T1AbA67Lm+i1L cjzpcJH6y4iXtCLySHts0nJzzFgfOe0iVzztrcgYw3H83yI7+mgO95rS3x8llx5U1ST1 dLc+dcJy04vzIMROn6YlNLXdWFogFuFPXMn+DGEaaZGknq0Inq8IeKlW+uw81qR/Ycsz eqvA== 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=LpXK4QtSXraUQ+jRpkogOhgYroQ8dBMsRdFzLXDbwtE=; fh=xwsW7eBwfe+EbJ1t17Nu0Xz7nayXixmMemO9NZOvxgg=; b=ZQFLErsyuqJ04KgvE6NCqbXIUZmt+mgZPURFBb7Tn5kmxZsOntwG6t/3h/4GNHFD5Y IYL/X88Hm+RvcQZk+iNAdt4s3I98X70sqicEuxHYMYDDYOdaIg+yHRFDNUnBrSI0Cmqf /RVXS0dxvgCcd16xjSGsKezm3Oxfu68fZC17v864XeI2Xktz3N8ozrlNLbn1v5D+1987 bNqqQEfU85Wk4x//mG2Qf31x4/Q9UmSecuXKmrSYsnLr1y09tyM/dvvY3CSQURnP846k 0fv1sZVQRtf0Bo/YKrE28KjlFgB+AEwKDJF0+XGN6pxPjGHQZMyuausxRXUESDVGo82X KVBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=cBUGftx1; 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-176113-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176113-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. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6340b3951f6si4031585a12.192.2024.05.10.11.43.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 11:43:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176113-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=cBUGftx1; 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-176113-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176113-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 7AE9328831D for ; Fri, 10 May 2024 18:43:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47752446A2; Fri, 10 May 2024 18:43:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="cBUGftx1" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (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 060F13CF4F for ; Fri, 10 May 2024 18:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715366614; cv=none; b=AXfqPVsEqcZQGwL9AuPEfX+/mFlAHPAycPq2MRBJev+C3tTa5wbOXFwPlA4j1hAwLja/h+TkR+7P/0sEZw4QB0O3f0wU8bx4aSldh9jckVvJUzK/pbUzJ0fwqWW4ask5iYM9Sm9CiZ+uTzgUjUAATrdyxSxjuGJ24ZHA+rLDZeQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715366614; c=relaxed/simple; bh=Mox5CygbAp0hbnlUnK+vjkkchP3v4sLYbiSX1PaNIXM=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=KeiD8eUfo3IIYm9VZCq+txMJ0jgbl0tbjkn0WZv9t7W8vfxbcFid8xCghrFkn+0BQbGcomJwQo7GzcrZqNrIQgZIf7unnYdwBeRS4KoUBVUK27Yxuqa8gX66W2TE70jW7p5QDxvTK/evlecXCm/5zIpYuI2OvZz2jCMMo/Qgo0M= 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=cBUGftx1; arc=none smtp.client-ip=209.85.128.202 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-f202.google.com with SMTP id 00721157ae682-61be4601434so42813237b3.3 for ; Fri, 10 May 2024 11:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715366612; x=1715971412; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=LpXK4QtSXraUQ+jRpkogOhgYroQ8dBMsRdFzLXDbwtE=; b=cBUGftx15pUhg4NtQIUT6AIsOC2WXipxPcc8yTzbT4YToYXznSt+RvlfGwjM+GXi8j 2EYCSvEt2L9bqc/tE02kb6waZGFZ76n2bPFkG/sf9KprSfZ4i4aB5HciE9396gvqOzXc J6tHLAtUCIBARxKcM35MrN9qVw+NMVYRZ2kDAevudML9WwsfRXhYtvuBxV+fyRwT3115 I8ZjYhk4ibxIMf2enTUG+6x1ys/EpAvK3u+ZmwqjNjT6fQxYpEoMViuDZL5YYP+J7S6a nmMJlJMNVcES9ebQt2pS6pTbIF4UDFcVGRO1ZQDXHGkMEtyQw29q6u8WXUD8133DdmsP Rg8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715366612; x=1715971412; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LpXK4QtSXraUQ+jRpkogOhgYroQ8dBMsRdFzLXDbwtE=; b=H3+Bjg9OZBE81htS60HcdzJyJB5/oQhiSOPuzHhjeVZ+baP9kAyQidpr+mIJNWIH6N DekqR8F/8h/TQ0mhI7g2oE+unD/LhCXYKHJHdKaMAUb+Kh7WKyIw34VOQCULuhQaVjS9 wRLLn7viTUE8t9PowmucVUEgtS2mymz0Un/U7UfHsEA9rayod2FhDQcymthUWoWYcO4F TcBYBJPAMlB8XADdZfRzmVWt5+/GXPNjiQFWsTBptUMp0aLe4KVOhIqQ0+8NO6JEvdLE 4buVl/rbh7IscxhziUwZnKZxWCauppgwyTS07w0ZQlGsZveQ2zw9AV06s/k9RUFwDkgf Xgvg== X-Forwarded-Encrypted: i=1; AJvYcCVIVQvh0+02+HtyRS83teKdsMTgddohoBVoiH+jYMA/HaZfg2R7wy1dBrrd21XphIUr2r36RqveiMLqjxcgC80mpOmEfRDRWWJwfiug X-Gm-Message-State: AOJu0YxzYBWkNup1id4z+ilZr8OHrG/uf/p63vSWf9RNi5Z0tdkccft0 Vmy3CRIqp21kn5Ju0LCGZ41Gvdg4DKrgCAq+cVhnr9FBsYm08TLHqyPfhahEbrUWB+UhBvj5gEX /+g== X-Received: from jthies.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:23db]) (user=jthies job=sendgmr) by 2002:a05:690c:3802:b0:61b:e2ea:4d7b with SMTP id 00721157ae682-622affa5943mr8898277b3.1.1715366612088; Fri, 10 May 2024 11:43:32 -0700 (PDT) Date: Fri, 10 May 2024 18:43:20 +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.45.0.118.g7fe29c98d7-goog Message-ID: <20240510184324.2944101-1-jthies@google.com> Subject: [PATCH v4 0/4] usb: typec: ucsi: Update UCSI alternate mode 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 series appliess some changes to the UCSI driver to help support AP driven alternate mode entry. This includes... 1. An update to the altmode sysfs group after registration to make "active" writable. 2. A change to the ucsi_partner_task delay when queuing ucsi_check_altmodes to prevent it from running before other discovery functions. 3. An update to always define a number of alternate modes for partners and plugs. Not related to AP driven altmode entry, there is an additional fix for a null derefrence in this series. I tested the series on a ChromeOS v6.8 kernel merged with usb-testing. That build had some additinal patches to enable a PPM in ChromeOS. Let me know if you have any questions. Thanks, Jameson Changes in V4: - Updates to the commit messages. Changes in V3: - Returns typec_port_register_altmode call from ucsi_register_displayport when CONFIG_TYPEC_DP_ALTMODE is not enabled. Changes in V2: - Checks for error response from ucsi_register_displayport when registering DisplayPort alternate mode. Abhishek Pandit-Subedi (2): usb: typec: ucsi: Fix null pointer dereference in trace usb: typec: Update sysfs when setting ops Jameson Thies (2): usb: typec: ucsi: Delay alternate mode discovery usb: typec: ucsi: Always set number of alternate modes drivers/usb/typec/altmodes/displayport.c | 2 +- drivers/usb/typec/class.c | 18 +++++++++++++++++- drivers/usb/typec/ucsi/displayport.c | 2 +- drivers/usb/typec/ucsi/ucsi.c | 18 +++++++++++++----- drivers/usb/typec/ucsi/ucsi.h | 2 +- include/linux/usb/typec.h | 3 +++ 6 files changed, 36 insertions(+), 9 deletions(-) base-commit: e4306116b5e93748b3eaa7666aa55c390b48a8f4 -- 2.45.0.118.g7fe29c98d7-goog