Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp496530rdb; Thu, 8 Feb 2024 11:48:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUZbfvHQFOVlQQr3mYmIxNvURveFM9x+kyebbaHrJouaEf7kOOmOwxj+N63p7ZyYQ7qpiUch+DT/tHvHn7SkYmMoq7IASYx75fJMBfSpg== X-Google-Smtp-Source: AGHT+IGP39Mta3NwNYOKINxozGS+YgQyYjYRuE1NQ1ZkF62NuecDFFS0y5dzEtNzEtC5yHZbsBcD X-Received: by 2002:a2e:8684:0:b0:2d0:d055:4d30 with SMTP id l4-20020a2e8684000000b002d0d0554d30mr287584lji.17.1707421737360; Thu, 08 Feb 2024 11:48:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707421737; cv=pass; d=google.com; s=arc-20160816; b=IHarQ5YSpzGoXw3KpiZaTPzulHKSbmfbz3S7rSQGQTtPO0sDaOYkDGccZ9P+N8L1Kc AmbG/ZCummJ8w1nXSP8a8r/hjsqerC4ywyhwyiD+OblroMogMnJlAJ1pQjMI0ESoEYnY p/MTWosZ+Wcur/ooqTsLY/iN7zk5rKNKF2UHQiCYhYKeYABtdK1wfcKqCVow7gSyTnNz HgoQzSCPngcFKOfME42L3dDLsHi7qFuAGVXpKqmmJszyEoJPmmW/bMgWxb3eJ3IS2LmM ZKzn3BUh+MxZ4SWrYW5yJMR/7LCEeM0uj6SnDCluje+Pci96eAf1lCVfOCWYv2SIGmCT 8qkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=0o3ZX+cYKVcvLxzGSXiG/iTbM06IS54gjI2VxBYvRQQ=; fh=V2PQXblWLTIzHVu78oXya/MD+pOkOqsDun/9OEibnx8=; b=ZElu6zY4tj190OC30OCMaVapbHz8lJryKb4X9NU9AaxfBX4VHwvEfTq/o1VPu/tcEG 82ZbwGHFmhqO7WtD3iwmFxAq1NuNQurABQPnKsDHWODUbEk6p6HK5+gO9EMcuVnletW2 qBpxt1M3TGkst7CJo+RADcmoCl07o46m3s9Daqgnrpx+70gCYplBFV++SZYEfL0xjXYT rpLMM9A6xFcmxXUmIt0npJzg6xadbx++XfkneG51QYImLlbkuXYTP+YG05VkRDN+f6re Vvkn+b7vGBf2fLsww68uzZg2dRR17DW15VgIY0gnREW3QjY1mGqH+Az8UK74q39cEa9s c5bw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WmFpBefF; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-58635-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58635-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCU/JvLTixU6oRvIbaDrnOHlya//gZFgB+4dJiYNN+wRsI2YgXpt2D/yzjgJ7c53ZYfbUXYTrKwPvGBmnPK++NDdnGZOn1VN+PVes0bpdA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m11-20020aa7c48b000000b00560baae37edsi44000edq.690.2024.02.08.11.48.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 11:48:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58635-linux.lists.archive=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=@google.com header.s=20230601 header.b=WmFpBefF; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-58635-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58635-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1A8391F3148C for ; Thu, 8 Feb 2024 19:48:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97C50381DD; Thu, 8 Feb 2024 19:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="WmFpBefF" Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 2FF633714C for ; Thu, 8 Feb 2024 19:48:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707421723; cv=none; b=MpckdFnbylUKZh0r4ZffbE0or0OUuTvzEce362atVC6bB4zegtJl5asaNGaDypILuw0TGZ7LU562TN6SEPO8lMBAB4ZNYgxx+ASlyRDGujxCL+/sfP/XQ4Q/hZ4RiDBjnE+1SDwak8DFBnVWSbF7Hcmu0vQMwxAYFDd3R1LvvZM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707421723; c=relaxed/simple; bh=QRHcsfNL5CodrBloEE4Fot31u6FMaHiMM28bKZysteY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JdXdfwVJwL5xXZYPYRFcMn58RksK0tgZ9G9fGzugR9nhAXkXnKGd940e+xrdRFjTW9LPzOIL7SVhWk63hbvKDtQQw3gMw7xKmnMolDIxgMlzU6ti+O0GW4vjq+0cSJ0DTFWEYC0U1RUt2P/n/bjZj41Usaq+IpqU7vQq0C1R9mc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=WmFpBefF; arc=none smtp.client-ip=209.85.128.48 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=google.com Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-40ef9382752so103665e9.0 for ; Thu, 08 Feb 2024 11:48:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707421720; x=1708026520; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0o3ZX+cYKVcvLxzGSXiG/iTbM06IS54gjI2VxBYvRQQ=; b=WmFpBefFfkZZ9ZjvABNEvdDOkxlO1c87CBrbzhYQnkbeQbfG7Lo8jusUCajauY2Mtz B/xgIgVce59JHg1b6MZA76IHWs5IgAviUlc3VfTdKoRm8s0q8y9xH0Hl9stg0lnMkPOz +vXSOkLblssh5RCkhAsuZGEWuJeXvARk5IwgndcavQjxyVKAO3zOQ/UyTmWBIflR4quT MLiCXRjVa2b4vOq3WzcjifG4oe9cdOi7g0acXQdQfsgbnGyDswV16nuP/Pqy7WrYDIPH llrPYqgzsw0MnbRR9g/zMozvQjHbmm7mohBTdMKPkr8SnZIW6he3gFd5CWC/fzot9dRx R5gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707421720; x=1708026520; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0o3ZX+cYKVcvLxzGSXiG/iTbM06IS54gjI2VxBYvRQQ=; b=sDlh/3iSULSvvY/0APlUygw7czIKcIfe1DtCnpgVRnPGIOfV4D+E61dywgUWPzdjh9 MBAoAd07tXls3Y3IgPrL0WwEw0w9bofjnn8QubaJvZWDy941vEfLQYP0ZAYx3Pir2X4O qqClb+PlvhzUcz0EH+U5TprfpABOlUyiqcC4M3Lik+4vNcHsE4h21PPONCpBdj3kap2k oJquHahlf2fQpkipn+SEAvgMdT7CYNvddaUYuXfuirXRZ9U5jcyk83QDALjPMeku7bVm m2nIrbs/eT9B9UP/cTXYI+DRSq6ZEk3qL5v83EAb/PBDzf7LG4C4w4ZozjGJr0wAX2+Z KQrA== X-Forwarded-Encrypted: i=1; AJvYcCWatBGb4Cr5tdIfo+kXbp9CASyscGnOq4GbOtO26QAy4cp6+dD0nGfKXfaoqfM6EbzVs8b32+5kB7BCjaubYLvrkYx5vNq9BQltQJDu X-Gm-Message-State: AOJu0YzL0l0SD+cDmg+YWyYRXqxlztfhZZFq0YZh0fQMNr6ceK3PPeq5 WhxvHe5ImXV+mqFMZUW22NE5sV4dO6ADL3srzX8LZpqGVeu0uLrKKBCCMa6e4tarhduzu/LAE1q M1+jtbgnOk1I4em9KhTUTJOTwc5Mw2p4mgU1g X-Received: by 2002:a05:600c:1e08:b0:410:2267:47c7 with SMTP id ay8-20020a05600c1e0800b00410226747c7mr25521wmb.3.1707421720329; Thu, 08 Feb 2024 11:48:40 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240125004456.575891-1-abhishekpandit@google.com> <20240124164443.v2.2.I3d909e3c9a200621e3034686f068a3307945fd87@changeid> In-Reply-To: <20240124164443.v2.2.I3d909e3c9a200621e3034686f068a3307945fd87@changeid> From: Jameson Thies Date: Thu, 8 Feb 2024 11:48:28 -0800 Message-ID: Subject: Re: [PATCH v2 2/3] usb: typec: ucsi: Update connector cap and status To: Abhishek Pandit-Subedi Cc: Heikki Krogerus , linux-usb@vger.kernel.org, pmalani@chromium.org, Abhishek Pandit-Subedi , Dmitry Baryshkov , Greg Kroah-Hartman , Neil Armstrong , Rajaram Regupathy , Saranya Gopal , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Hi Abhishek, > +#define UCSI_CONCAP_FLAG_PARTNER_PD_MAJOR_REV_AS_BCD(_f_) \ > + (UCSI_CONCAP_FLAG_PARTNER_PD_MAJOR_REV(_f_) << 8) Can you replace this with a common HEADER_REV_AS_BCD macro that can be used for both GET_CONNECTOR_CAPABILTY and GET_CABLE_PROPERTY? Also, the USB PD major revision value in the message header is one less than the revision (PD Spec section 6.2.1.1.5). So, we need to add 1 before shifting. Thanks, Jameson