Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp903938lqt; Fri, 19 Apr 2024 14:17:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV5tYnkakXD7+Oy4NDAl+aJ5T3UgR0DS9Q0tTXMDiWxdciw9JykphFmGkSP5jIgzR5AByu8l+agXzgXraNtve9U1QzjrtzohftA3fybpA== X-Google-Smtp-Source: AGHT+IErWx85LPH2jRXilSobQhEh4PZ0ReuGJF8z+cEPAlPiyhMxXNOzz8NuIXsfYfD465Nx/24/ X-Received: by 2002:a17:90a:cc0c:b0:2a5:d979:8eb2 with SMTP id b12-20020a17090acc0c00b002a5d9798eb2mr3239397pju.19.1713561444600; Fri, 19 Apr 2024 14:17:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713561444; cv=pass; d=google.com; s=arc-20160816; b=TPqGD85rGnSRYLpFf/4QP3I/rmVGap0XAGVKKwT9Mqsx8rKJQum9Qa216YufjKS7E/ NjePdueB16jELqpqpeDnOxjsyRwPM1tt8d0xmU/A9tjj/G3kQ7Y8StS2RHGuGGKZQYjb n8sDyWRfacEUBVCl63msI+gh6MODbLJTZsLEcFS1PXujO2h0XmGliNTM4mFyl4m6pD1Z 8endeB2IC3HFyaak/5k0t5MTWMtFbBED5fkyJMG93bsG76JePlMIx26LtvO+wZ0ppAqQ LRipYDJ/iqqNIILAYF2AFkv2NGvMzFqy4ti2wKgPnApwZAwclCWN5ZafZQAyWwAG4j0h TNlQ== 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=jfW324GVea+1ib21HzTSsw48Lyt5jRPQcBMMMk4fg5o=; fh=fp9pftd9mlOPC0Tw1ECoPZeVBJBBVnBVs1IwWXC0B3U=; b=G7OhTTrqsFgE6h1pdG1KLtsQ3tgCtdyGtPiBxEQ1FHfRWpTYwRZrI7A/ipsgdqu/vh sPFAUO+ik95hqN9/2i3VS/ZJzCA6PshFowSDARICp3v3EH+m/aHYCwihXYQFT6Mkd8bp kDyWX+W40jVyZBCnRfL8aGoidXWuyZH/4/pjvKQnYmQbX+/lahNr0iofhWYC02+469dr J0by2rLevI/sFafadcpny2GEgnCCL8YrDHpvHZSmHybB3H7nbyQK7XaccSyQ0VoJidAF Fu3Xwb8ShxKQwK5LP4284iuG11EmQ2L/bM1py4QssHrpsSR1OtuB632v0zCYDuYlWMjE 0m9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ojdTzgMg; 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-151966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151966-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 e15-20020a17090a9a8f00b002a5e71a4900si3721136pjp.106.2024.04.19.14.17.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 14:17:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151966-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=ojdTzgMg; 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-151966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151966-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 B766C281747 for ; Fri, 19 Apr 2024 21:17:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 504D083CC7; Fri, 19 Apr 2024 21:17:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ojdTzgMg" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.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 343F92B9DF for ; Fri, 19 Apr 2024 21:16:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713561420; cv=none; b=L298NoF+HLBgf1T624gnHBGLdiPKRVgRgA7UxEjyx8PeJwYZ0OTpb8cNmcCh0ZgYzL5SLHC2lkEwoddxNl5m9hfrSMcH8lARr7oPE9qwnxUgj697tQxg+A2A1Sp7VauRqo4G5xQpX0ARNmKny8g0V4EWlcPWg6pd6xf2zGsXEAI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713561420; c=relaxed/simple; bh=bJMl96BXd7Fcmqs2yLxX7XV6jZ8I2SETuRHX5I79h/Y=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=Ni1QzThQ+RdbHX+dZ8EZQNf6AwilbI+OQLd/VupHeDRdwxKpprxlGA87qsuZNxlHOU1qDNQQAl4QoyaKzEnxb3wyeaEiuPAiywgOR0haFw5vDt+ojNs55O82eJGporLVe4t49rOxNybCiZ6vkYuaBapjYNOvu54moCUMlvvUNJw= 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=ojdTzgMg; arc=none smtp.client-ip=209.85.219.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-yb1-f201.google.com with SMTP id 3f1490d57ef6-dcc0bcf9256so4366509276.3 for ; Fri, 19 Apr 2024 14:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713561418; x=1714166218; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=jfW324GVea+1ib21HzTSsw48Lyt5jRPQcBMMMk4fg5o=; b=ojdTzgMgNMfQHPyN1Fr9v+PGXjZYEFEuw7QV2MOPaZ6EuOTilndbFk1kY6U4l1C+qt umQWsLGi84eZ9SRrBvQacg+PlVcPm9EoK14436T7D0axb2hRkllZvEmsnerp41UgV3xp EIhX+SXIYxtI+zOhYyw7JZlQUAh9cgj7ejTrigJwSjLC+Omi/w0y1eaWuGnWcUpUDRFE tIJjLS1nNapmqqd59AZ0lobjgY3AhXbpx6tjatcjrxhEWXVCMj3i4YX03K+33yuedX7+ 5XDJKmNLULX5GLmui/1wpNVoXlfFGJGwWRlBzNYngXmpdSCWSTp0chVRw7G7JfNdaW/h oEmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713561418; x=1714166218; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jfW324GVea+1ib21HzTSsw48Lyt5jRPQcBMMMk4fg5o=; b=OOXauXqYyvUGsyhvVpW3thcHzxWfQx/VdJKVrIsSYbA5meyIZ43I1WXFULR8tlLFMl ySZLbIyh+r5NOoJhzZ1n08bS4ExTPbgd5JkEk9lez26Pqs0Yzk28qahUYddXDU1AAuOZ rAZqg+OsdqI48ZmCeXfdnY3qrSzLBIAQapgwdqNYB3dTbZ48M1tcbOZ+eBpjmeh7X/yq Os9ZHObGkIATSbernN8/7S0pkONWvBZK2TiMG2jcaA81Mg1UYJXelkfMtEVo3pdF8YD7 ScgjMArtJmDYFYOd3owj5vn4+hOQ7H3sIWbkYd3+V99IlWCN624tNkrmc0T9pIvuX0PC zF0A== X-Forwarded-Encrypted: i=1; AJvYcCWEE6wpYdrqozl1qtZ3gBnzhnwy2YH2SjzVXbQxvgbiLNBosjLEAh1OgCAH2rE+/ElPC2lUFSBu35Po0DdvPPwLtiUYeKZpH7dyrysw X-Gm-Message-State: AOJu0Yw5gNV19jN+rfx4E2hGkM0eFxZQ/VnJGzl8TS5z8PFmpuR9iK4h 3pG+GoCU+hzlHohdFngx1zARSFqn7l+8s2qNMcCvVS7FO/jkVF3wMpdCW8Ajls2lv9wXIlDNjG4 50g== X-Received: from jthies.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:23db]) (user=jthies job=sendgmr) by 2002:a05:6902:1884:b0:dc6:b813:5813 with SMTP id cj4-20020a056902188400b00dc6b8135813mr264420ybb.9.1713561418084; Fri, 19 Apr 2024 14:16:58 -0700 (PDT) Date: Fri, 19 Apr 2024 21:16:46 +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.769.g3c40516874-goog Message-ID: <20240419211650.2657096-1-jthies@google.com> Subject: [PATCH v1 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 Abhishek Pandit-Subedi (2): usb: typec: ucsi: Fix null deref 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: 684e9f5f97eb4b7831298ffad140d5c1d426ff27 -- 2.44.0.769.g3c40516874-goog