Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp687096rdb; Thu, 22 Feb 2024 17:06:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXsaO9lJggXezlYe+5Xem02M/Ga423X9Nz9i58+iKtvxT7MDsQv2jP4xaXSvRGChloiVAxJX1NTOnfhN9idldtWsydIguj6AdoeUB6rqg== X-Google-Smtp-Source: AGHT+IE+DsqAYKj8UVLWUoMC+ktbwmrFC7mP7O/+LjKSzUVKkfFM080tFkISikzynXi4f0jVPdGH X-Received: by 2002:a17:902:e548:b0:1db:ab9e:8f90 with SMTP id n8-20020a170902e54800b001dbab9e8f90mr602206plf.37.1708650387339; Thu, 22 Feb 2024 17:06:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708650387; cv=pass; d=google.com; s=arc-20160816; b=ocMCYD+PmsmItlMZxRW2Lx4aeMV0xc2w9R45iWjRX9H8CkUpQvo103nO3NpbyKbMXq XMUl3DEF+WvuEngxwsEX+covfkHEo/vlm2hpOg6KFwyaKRvgdXRIIuNEVIWkTT0hgbjE L9WnxhSRS08KWS54P3c+4CzJEKt9UzSim1HgG8tvCA+rIUi84o5R9djBqZOSW6PMIHOf uV77UyJyulokoxi2WW+qNRm3/b4rsdRwLzEqSadbtFaFeyWq8G6VH7xmCHRYH6BCEXYB 8rQbJiEX8RTgC9jxLeBcGwF7fPlbWa3M8Cyaz8KXAenaaZTY9dUVWhqdnrhKaArt7QPR 40rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=eXcGLp3XklPDGcQgU4Tvmf4Q43ky22vQ6sErhij3a6c=; fh=lGicdYMz/r8S4lEgVhfgRo1CH45i5AbFsLuaKkUdEq8=; b=WMQ1eHLazGc4M3w05zx7cWhonTM8VUQbuE8k/49xeKfd7Jn0iBHwGWOac4r85X59Ib EbUqVSFc16OebPTYpRt8hd7FjGruOqMDnOa+0TwYYVU4oEutlVvIRphFSxRub1jJzeqJ aAihbv15WxMenx+mh6hx/Zc7ezQMCEQzKWnSjuaHBkAxAHIc/mlCTdLrROOpWbAbi95i yyplYWNe/Lt5LIYF8Ba7vAHVOE0QeFuUsbvMA7B3SXZ4SsChAlZLJFQAXdqZLF60cIXj aGo55yf+lH0IlLsPspy1zpsvDFJGEbnfsZyN7EpqkMzQlyslk9SyuK2PHCq9qYVZ+nKZ QfvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WA36HLS+; 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-77601-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77601-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ll12-20020a170903090c00b001dbf2d899c6si8631728plb.433.2024.02.22.17.06.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 17:06:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77601-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WA36HLS+; 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-77601-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77601-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C1466B2164D for ; Fri, 23 Feb 2024 01:05:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8312B651; Fri, 23 Feb 2024 01:04:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="WA36HLS+" 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 B69CCB657 for ; Fri, 23 Feb 2024 01:04:52 +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=1708650294; cv=none; b=dFDlPwu9uIlxDUNLRf8mtw/g6Mq82+kXzshdC9u5Pk2BzWS+S/80ree3DhAdHExvKBhR8CNlXzDstrpQHK2VaFtWw/iZkdCOTRNbYXsaKFnZ4M1CBddQ7VQMyZ3ljfJ4JewY/k1gkhcq/AR96PCw/QTfp9Ybok08tT58spmF5CM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708650294; c=relaxed/simple; bh=z+h1yXxJcUa7Q+rt4Z5SzcMtHfpQaYLneY32ZhvvCDU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=c2HSOAaZBfj3z33yzd9mWcejIsVcYN11VEDwi4hX7z+AJc9IZJcD9EfReL+DsC/1IEpyWHIjyw2DxxezYb9Q58AZSsJ5dd1XvaI8i7Hv7jPwAar4pBY1LiKlz8nl3ROc6RIobaRPTLhgdr37KRd5LOaDR17wrYOhL5w2+8NRiVU= 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=WA36HLS+; 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-dc6b2682870so570988276.0 for ; Thu, 22 Feb 2024 17:04:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708650291; x=1709255091; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=eXcGLp3XklPDGcQgU4Tvmf4Q43ky22vQ6sErhij3a6c=; b=WA36HLS+J5v+rQdbMhr2IpkjNfrT9BewdgAGiw3HJjBH/Yiyvza2XQVVutXYo72ZBe 5zhZzC5e2YMEyf5z0oCyX+irfTq3s6eavAsqI5N0NamkxlJgikK21wvwla40E6W2Sunv J9NRokaAi8oLPeJpc/sT+HlN6xMY/1JUXrSj94DzcZ7wl05IN7NYhlW6d8rJulCr6vzH 2epKbRkJQJWMpj8xEtJ/JfAVg5xGVJHr/Cv6bsKT2Uz3M0i1DGxcsSTrPBgAsp4sqSJu 8oCxa8iElsg/CN/aiY4M0+SXl93Epc47A7GrkORbrIwY4SC3g9yalOyxGjBxALmlTluw NFvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708650291; x=1709255091; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eXcGLp3XklPDGcQgU4Tvmf4Q43ky22vQ6sErhij3a6c=; b=U6exhF5FAjcEuV4M5walnh5ePqXxLJ7v4rLboTI6wRuhmlJ7ZRz0RDkADUSZ8DYh8d W5+F85k5iZ8M8aW9SrGxca/MruTsy7NE+rPN8V3AT9lLZNMsT+DgIQvhZZGvbtqLmVy9 MI+vl0fNFEJFSbyvI+5/maDH9qz6Cg7d1J6vbrbHuRJIyH2hTNCvb+24dTn0LNm/l+I5 cpsaz5eL4/KP9PVJ4g2jfitHSFSzKuwKbdXI2O3enpx1drtAwQsXvfusbDeVnaP2elV4 Ub5ZJOL6Q8hncnlRH448PQSSllrmPYB+pYPXWS4UF0iqKZm0X15GRGm2Fy36TILS9MMy Uuug== X-Forwarded-Encrypted: i=1; AJvYcCVG6AWApSzxiE7oNnQJmZ5h3BA/B7pgWiPG3G+/pKjXPB9x0kYW+xlBbWL3JLw3WtRUtZQA9uYmUjppdhJKJy98DkDgDK+deds7skld X-Gm-Message-State: AOJu0YwqDTBnzE1Z+VZXT98mDlJHjI87vSbwYk1r0u9QftJ0MACB89/D Ebbqy6EiIO/dnUQ8ZthGtyVogD3ee6CVgsZcEBi64oCs9mY78tarP8VSOFPk1uNrjbjdHXJcjJS B0g== X-Received: from jthies.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:23db]) (user=jthies job=sendgmr) by 2002:a05:6902:18ce:b0:dc6:fec4:1c26 with SMTP id ck14-20020a05690218ce00b00dc6fec41c26mr202150ybb.1.1708650291721; Thu, 22 Feb 2024 17:04:51 -0800 (PST) Date: Fri, 23 Feb 2024 01:03:25 +0000 In-Reply-To: <20240223010328.2826774-1-jthies@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240223010328.2826774-1-jthies@google.com> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Message-ID: <20240223010328.2826774-2-jthies@google.com> Subject: [PATCH 1/4] usb: typec: ucsi: Clean up UCSI_CABLE_PROP macros 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" Clean up UCSI_CABLE_PROP macros by fixing a bitmask shifting error for plug type and updating the modal support macro for consistent naming. Fixes: 3cf657f07918 ("usb: typec: ucsi: Remove all bit-fields") Signed-off-by: Jameson Thies --- Tested by building v6.6 kernel. drivers/usb/typec/ucsi/ucsi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h index 7e35ffbe0a6f..469a2baf472e 100644 --- a/drivers/usb/typec/ucsi/ucsi.h +++ b/drivers/usb/typec/ucsi/ucsi.h @@ -259,12 +259,12 @@ struct ucsi_cable_property { #define UCSI_CABLE_PROP_FLAG_VBUS_IN_CABLE BIT(0) #define UCSI_CABLE_PROP_FLAG_ACTIVE_CABLE BIT(1) #define UCSI_CABLE_PROP_FLAG_DIRECTIONALITY BIT(2) -#define UCSI_CABLE_PROP_FLAG_PLUG_TYPE(_f_) ((_f_) & GENMASK(3, 0)) +#define UCSI_CABLE_PROP_FLAG_PLUG_TYPE(_f_) (((_f_) & GENMASK(4, 3)) >> 3) #define UCSI_CABLE_PROPERTY_PLUG_TYPE_A 0 #define UCSI_CABLE_PROPERTY_PLUG_TYPE_B 1 #define UCSI_CABLE_PROPERTY_PLUG_TYPE_C 2 #define UCSI_CABLE_PROPERTY_PLUG_OTHER 3 -#define UCSI_CABLE_PROP_MODE_SUPPORT BIT(5) +#define UCSI_CABLE_PROP_FLAG_MODE_SUPPORT BIT(5) u8 latency; } __packed; -- 2.44.0.rc0.258.g7320e95886-goog