Message ID | 20240209060353.6613-1-abhishekpandit@chromium.org |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-59032-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp655967dyd; Thu, 8 Feb 2024 22:06:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUrldRaos2Mb+Fps9vQQHMmNcUmHe8EEN4s3f+Es05ImgXG+aZ+AzArXmIPCvJvOUrb6YHmT6kpbCkxU4mb5iKegNDEGA== X-Google-Smtp-Source: AGHT+IFF/wOxclQ5IHWkNygBoYjY2GHpi40xAGedXjtEyXXVns/hUOv2TOUPX219TADPmgwhtpHj X-Received: by 2002:aa7:d8cd:0:b0:560:d73b:aff4 with SMTP id k13-20020aa7d8cd000000b00560d73baff4mr465988eds.3.1707458806275; Thu, 08 Feb 2024 22:06:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707458806; cv=pass; d=google.com; s=arc-20160816; b=OuIEQ5dOK51VmApILHOGJl+SwVxvXNWdDq+X9U3Z5Tk5UDQH4pumy2OyiYUbEpa38k tk9BXGH/FpMTxx1gVFYsWklLVTXcUweycoYshXrDfZL4nv04zycnlIWZp8tgnYqhsPAe zElhTCsK4QzNRa+slnI/e/seeFw6ylwgdsSq+0OfvjeFkdHoi/T1acMnuVySWT3Qsn7L DD2UWHybpzTS5Ddl1E3Ud0qv+urJ8H7b9xFIIYvUJ5RufYwa3qJa9TiwsPTjqm2PT3sC fmXc+UuNo+9xNoZkS2wIx9n+sbPpEkmNNBB8iEofocnccomgFgTmiMraSShaEYIovANs +9RA== 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=Wop2DZZiRdIetXEhCA50GkVFZGoE+ZvL11qzq1IkmSA=; fh=3LqClvAG5kd0rBazAf/E8/QQxFXCJxpJkSMmWVDc2Ek=; b=BoXZxBspSzVE+regbnMxO4mnTlllnH5Ffp5IPFQVTVwqMyfLt8d3FdDqNSRefdqlJd MRovoqipe6q6/ZMWWDIsfRz7fGBeAKqwRxsXu6UuJGYT4k+VkZcneU47DEelSjMzE5V4 Vx7Z8sgS4v74PunYyXZDZW152sqBcuI6RblDs50jP+95ZB6uKuXSW+v3cII8k/tqQTf+ 387RAI2moLi7gV2/PuRG0Te68Q4jzQxPFKLM43X1PNZKSBbIZzTr59Ay0ETm07G0HN/w o08zGRs34f9w8qlpL4tkp8qzKzGadyjjgwOM1eRdLYIUkmxtJAedwbNH/rOrfkGDmtPD 72pA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UjXHhvXo; 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-59032-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59032-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org X-Forwarded-Encrypted: i=2; AJvYcCVx1tzZxSkwxlRQWHPKW22c4teiNPtOG3ImTjse8AI5rdzh2ND8zSn05RJQn5M5LffNE9IYzfoQYPAhV/pfVxfsZ8qeOA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f21-20020a50ee95000000b00560bf669fc0si505944edr.90.2024.02.08.22.06.46 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 22:06:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59032-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UjXHhvXo; 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-59032-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59032-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1718E1F21980 for <ouuuleilei@gmail.com>; Fri, 9 Feb 2024 06:06:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF90558104; Fri, 9 Feb 2024 06:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="UjXHhvXo" Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 0C25A57307 for <linux-kernel@vger.kernel.org>; Fri, 9 Feb 2024 06:05:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707458746; cv=none; b=PJ12dCDRL47SoQZPVlnLS85NXokMc0tI4rXMugFipuNzKH9S2uv3YOWeBTsmrGisaP6JczBhHnydnIWPLOqYUNHqUp/UJg6joECTrMoFkacp+c7OkwS/wJmewcgdOMDnPT90hCR/rF1sKbRzTL+83oMq2l5L8Y/YwlsP0k2D2Mc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707458746; c=relaxed/simple; bh=qO4AJqFeWco3A8E/6FW7maEYvxGUM+hVSdMsYUPmXqc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HkiIJE6t6CgJVm2HEME/xksq+8JURZM6jiCzdHx8sgvYCZeonOVZda20iUqQAVayqcHc8O6XYGEizddZrOp5VMoweLD5ZTst8JWRBYbyVHz2zHLLVlpezHQd2eKnww9qYWAVPbUPIySuU++R4IXRrcn7u+Kur8baHeNJIJy2eHY= 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=UjXHhvXo; arc=none smtp.client-ip=209.85.214.170 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-pl1-f170.google.com with SMTP id d9443c01a7336-1d958e0d73dso4892215ad.1 for <linux-kernel@vger.kernel.org>; Thu, 08 Feb 2024 22:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1707458743; x=1708063543; 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=Wop2DZZiRdIetXEhCA50GkVFZGoE+ZvL11qzq1IkmSA=; b=UjXHhvXoIZsqYATBgAmW5O4yi1MJKQXq45+o0kwSMOLSkDK45zA8DTOeDR5l/kl4FL s6PcD8UCdd5iOmdf2HsYatS5riDz+wejPz0EB4d0zQDc4w0//0Itta9uzxlUFJhEF9MN cZdcLPzr/vosZBoZoheLh04aComZDz6ubwP2I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707458743; x=1708063543; 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=Wop2DZZiRdIetXEhCA50GkVFZGoE+ZvL11qzq1IkmSA=; b=BITJRACL68eu68Yy5Qj8Y8397G2hKGc49adgKv0D90YabxCmserIiaD5OWuSn45Cok wminMoYm5cTeXzgMwQ3QSLpYYiNHbuZVzEtNFKzquskrv7oOQf92TfjEIK8BiEePXTwe 0E2vs8tqiHlrniBfTn6A4SzznFEgkuxlTbHiLXx9oSgzfJnNnXlRxYphxoFhUGHez3V6 iwYuZk3dJmBQOtYawuMY/9mAzuYv+6HJjJnEwOWX6RMJ2U9bCeDuLFCD7/Dn75PNvoDq o+kXUgaZtkQknV6OskpUKbf1ctH+hd3DaKVaoFyFTeqS9D2SQ/5GU9dB+FrDfo2u3hsv t/Ug== X-Forwarded-Encrypted: i=1; AJvYcCXsUXLHllhUr9ny8GgwpPjVUFMNdThZkPrm0ceO2OrdvtUf1ikZSoDU/AobBnrQymNIaLDL6zwL5dcck6clK34JrRTjFM1tr+AeLCL3 X-Gm-Message-State: AOJu0YxGIWg1ohHN1V8M6+eQhlPhT+1wTR6FKXecZFoICDANo5O6lU8g bonW+xCUaaFA9nW+O19BqJj8pyHbMDawODX3oF7n4C7tr6F+DUIGKCeeK/03jA== X-Received: by 2002:a17:902:a3cc:b0:1d9:4e80:ceb6 with SMTP id q12-20020a170902a3cc00b001d94e80ceb6mr68511plb.8.1707458743364; Thu, 08 Feb 2024 22:05:43 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV6647CfHkfhQZv9Ckgr++w4OPqflA+xbPt4uXd4LLw2Ll7daZfyn/zuXc/cWKmleHRHaDYzIVVFFgnNoMlJUcpP5coUWL/2NYjon/XfZcGSg9zwV2M7FDYp0qidmePFWQ/jsr653prtM2cA02drdCrE6PQaSNDmpjRvnJCq5mZxq0iZbMsHJdAYd2urU7mce501l5IiB7E1qwQXgbWQGakux/oarY0EIRNfYSz4pZyXEFtH2l648V5RbHzMUGxH3ljWTtJW9CJPNekLLs2nSCag5G6oKbOBQEUIF26Ayo74oYwTe4VlSzAnoBGJPbF6kryfwZI0DIaxzAqszIwSlZlo91RvSvsQE9MNtSCgM1BmpnRURHtt0WaSQQLsEifbnNyYuzync9GjO5NtKjSSQDHXTnE0T8nnVimM0llW8FEOqHt/iGc2/e65OFWjo5oEwsgdeEN0ET0g6ANWgioCwnvWr6lt0h8OiPnQiOOUv7yszQjN9gPznxwEXz1a2lsNIdgTVabq7DHFWNsSSJFO68BtDc= Received: from localhost (209.148.168.34.bc.googleusercontent.com. [34.168.148.209]) by smtp.gmail.com with UTF8SMTPSA id kz6-20020a170902f9c600b001d9a91af8a4sm754421plb.28.2024.02.08.22.05.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Feb 2024 22:05:42 -0800 (PST) From: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> To: Heikki Krogerus <heikki.krogerus@linux.intel.com>, linux-usb@vger.kernel.org Cc: jthies@google.com, pmalani@chromium.org, Abhishek Pandit-Subedi <abhishekpandit@chromium.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Fabrice Gasnier <fabrice.gasnier@foss.st.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Hans de Goede <hdegoede@redhat.com>, Neil Armstrong <neil.armstrong@linaro.org>, Prashanth K <quic_prashk@quicinc.com>, Rajaram Regupathy <rajaram.regupathy@intel.com>, Saranya Gopal <saranya.gopal@intel.com>, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/3] usb: typec: ucsi: Adding support for UCSI 3.0 Date: Thu, 8 Feb 2024 22:02:37 -0800 Message-ID: <20240209060353.6613-1-abhishekpandit@chromium.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790400324805050288 X-GMAIL-MSGID: 1790400324805050288 |
Series |
usb: typec: ucsi: Adding support for UCSI 3.0
|
|
Message
Abhishek Pandit-Subedi
Feb. 9, 2024, 6:02 a.m. UTC
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 v4: - Added missing Tested-By tags from v1 and reviewed-by tags. - Fix BCD translation of PD Major Rev - Replace IS_MIN_VERSION macro and just compare version directly. 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 | 67 ++++++++++++++++++++++++++++++++--- 2 files changed, 110 insertions(+), 6 deletions(-)