Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp793230rdb; Fri, 26 Jan 2024 10:46:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IH95XNDXaE/IdHrfJC+y/K/hr0T8aP82/a6psE3D4WfqZXz2r7XrSsG8QkCfMitVBR5iaH5 X-Received: by 2002:a05:6a20:be1a:b0:199:5b9a:4604 with SMTP id ge26-20020a056a20be1a00b001995b9a4604mr115959pzb.106.1706294770260; Fri, 26 Jan 2024 10:46:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706294770; cv=pass; d=google.com; s=arc-20160816; b=lap77jZDWyGsUP9ydGcUCI6KVyekVf2ZStlWvQQeKSPgUkKLlAMr2md3sC9wua/mfe ah5Skxt7l9gDihlqYV+JhJK1AhAOBkTv4srpRlT8LrfPSX1FVvR92hjnwBkFITkqvEf4 QJNFSBJ47EuXq4S1L92lhIWcWEeWkW9n0LvRQyxk5rUsli6CYXeNRhA2KpPwlEot+Zl1 egLeq/JLDDYhtW1cYrvncz7tMvg1r+3tJH/xOKLLiJiotKesv+KPbEiwIRcFpzxajYNw qw00RAe0sjOzg0aF0eCn9N9dXQo1zwF8C8ajCTlbqbgfu0nGeDHIid/aSgOlzFFIMps8 YTKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=S8hCjCIj0wY+btghjatqQCYEGwLIKeiKm/Edu/1s92Y=; fh=XoPQAeu7Fuor2202s6JEs/0PUBni9ATIo0WIbdQ5L2U=; b=QKKN8yeSGi4cS1CMsH8JskBn15BXrmfLvxpQzbfCHfB7L5UYcdcKk2i9jufTNMpq8K es7uTV++/I5qEFQUQ5Nu5RH3xXR9H3emQUwNDntp9a1EgKoC7eXOP3SajsMnRQorukvf YgDe5FTQtjGzYwyV55fvgf1H4rzwazsiJF0Lxm2A6BR7/LydI47zpHf0daizve+ALOny jkHh6h4uewk4+sGaIeuveAk/KxXicNwc3qS6iIc9N+TIb02QiuSiu13mjC1jywKE7S+j i3fxSz2MjEJka1jTC5MP3wuIv/uVgQ1zfwkUTNxIP+Y2u3ItAm6Io6goYjwQmNo9I562 jLGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OYim8Ygq; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-40515-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b16-20020aa78710000000b006d9d2ba8557si1555407pfo.308.2024.01.26.10.46.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 10:46:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40515-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OYim8Ygq; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-40515-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D3801B25292 for ; Fri, 26 Jan 2024 18:43:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C518122337; Fri, 26 Jan 2024 18:39:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="OYim8Ygq" Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 85C5521A0C for ; Fri, 26 Jan 2024 18:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706294378; cv=none; b=nijmX5VQ5qjrtFe3TRSAHyUdsthUOLryDElv6RFRTj+XM03LqBvDCHiKu96uAH6rw+SF2MiSYpKkTjePOWGaAQfiIiKp1ZHPOLotGQlLB231qs0yJMU3/xthJ4/JiK1YRGglOXYEN2dcMbJul+Lu2qIi+nhrT/xBRJEjjmENyD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706294378; c=relaxed/simple; bh=pBwTJx9vqo4YpKH1g0zLKQIz+09wVpQoiwp6B3aMnxA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=babBTxf1hD7TxYIaqED+B8iz2uVfxhKtGTnBkwBsTI7gb7PKCWhKVJBpI1Fw8Hk48+QvfoKxc/1k0xZpoEvJDb8MvvmWZc1WVVjnto4YJOMTforyABKFEOH3LPg58/tPZxVQbJh5Qs2Cov1AxQZ2xPV8DQcYBYZEH1UMNbF52mY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=OYim8Ygq; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6ddc162d8d5so539820b3a.1 for ; Fri, 26 Jan 2024 10:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706294377; x=1706899177; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=S8hCjCIj0wY+btghjatqQCYEGwLIKeiKm/Edu/1s92Y=; b=OYim8YgqV/OQwKnAhAW8/8hi4LKOxbI7nM4ezzvyMfMmzOFesbclJh/YNdbsE1eWfj q1TT4R9LudMdEfY/3yYoUUsgASlYIPjliH3h5Z9dj9pZIJHXam4EJ2eUlW2+wMMVnFjN MfP8GkvrzfipJwhoB+3vCHQqUpNTD8WOM3F5Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706294377; x=1706899177; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=S8hCjCIj0wY+btghjatqQCYEGwLIKeiKm/Edu/1s92Y=; b=C4n2CTR0ythhBaKSLMrHZtlhkndErmpLvCJK7VV5d+x32apvOu4CnjY4rQyF6zm7tk 7OjbN2p0DbaW/fsy4oE7DSjuLmFk0sZpfwAKwX4mdlGRk9iV3VdzBYZsJPv+oNRaXR0P TsQ0ANAFDv14VNF4bq2zxYGMnVF9svNIQszSD5tQJRASSy2RsRDOLO7qR9IQk96rGdfv GcvQW/Hfh5CdQ6GFNmnj3X3PpRdw2KR9Zw0+6Y2DDi5C7WRvZBix6yzJdjcwq4J5bzBf f2Tdso/Kjg/1uZ0Cwun2cIydNt2a99MNdofJbXrPGyqEKzirGZmvmU2BJY64Yxa13WFF j6Qw== X-Gm-Message-State: AOJu0YwgW6/z8h+Mtqb/zyFL8ZtNtPJPRdhbcMJxsc55X22NHRzxnxj5 z8F9vsPxefSz/vHYmGzp3gxCPl0LEXweur+x+zbEyDRVJxYcPhNdGHz7Lh7WNQ== X-Received: by 2002:a62:6287:0:b0:6dd:7d11:41dd with SMTP id w129-20020a626287000000b006dd7d1141ddmr187072pfb.69.1706294376535; Fri, 26 Jan 2024 10:39:36 -0800 (PST) Received: from localhost (209.148.168.34.bc.googleusercontent.com. [34.168.148.209]) by smtp.gmail.com with UTF8SMTPSA id y12-20020aa7854c000000b006dbd3aec001sm1446879pfn.146.2024.01.26.10.39.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jan 2024 10:39:36 -0800 (PST) From: Abhishek Pandit-Subedi To: Heikki Krogerus , linux-usb@vger.kernel.org Cc: pmalani@chromium.org, jthies@google.com, Abhishek Pandit-Subedi , Andy Shevchenko , Bjorn Andersson , Dmitry Baryshkov , Fabrice Gasnier , Greg Kroah-Hartman , Hans de Goede , Neil Armstrong , Prashanth K , Rajaram Regupathy , Saranya Gopal , linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] usb: typec: ucsi: Adding support for UCSI 3.0 Date: Fri, 26 Jan 2024 10:39:06 -0800 Message-ID: <20240126183930.1170845-1-abhishekpandit@chromium.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Heikki, This series starts the work adding UCSI 3.0 support to the UCSI driver. There's a couple of pieces to start here: * Add version checks and limit read size on 1.2. * Update Connector Status and Connector Capability structures. * Expose Partner PD revision from Capability data. These were tested against on a 6.6 kernel running a usermode PPM against a Realtek Evaluation board. One additional note: there are a lot more unaligned fields in UCSI now and the struct definitions are getting a bit out of hand. We can discuss alternate mechanisms for defining these structs in the patch that changes these structures. Thanks, Abhishek Changes in v3: - Change include to asm/unaligned.h and reorder include. Changes in v2: - Changed log message to DEBUG - Formatting changes and update macro to use brackets. - Fix incorrect guard condition when checking connector capability. Abhishek Pandit-Subedi (3): usb: typec: ucsi: Limit read size on v1.2 usb: typec: ucsi: Update connector cap and status usb: typec: ucsi: Get PD revision for partner drivers/usb/typec/ucsi/ucsi.c | 49 +++++++++++++++++++++++++-- drivers/usb/typec/ucsi/ucsi.h | 64 ++++++++++++++++++++++++++++++++--- 2 files changed, 107 insertions(+), 6 deletions(-) -- 2.43.0.429.g432eaa2c6b-goog