lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230830223950.1360865-4-utkarsh.h.patel@intel.com>
Date:   Wed, 30 Aug 2023 15:39:48 -0700
From:   Utkarsh Patel <utkarsh.h.patel@...el.com>
To:     linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
        heikki.krogerus@...ux.intel.com, pmalani@...omium.org,
        chrome-platform@...ts.linux.dev
Cc:     andriy.shevchenko@...ux.intel.com, bleung@...omium.org,
        Utkarsh Patel <utkarsh.h.patel@...el.com>
Subject: [PATCH v2 3/5] usb: pd: Add helper macro to get Type C cable speed

Added a helper macro to get the Type C cable speed when provided the
cable VDO.

Signed-off-by: Utkarsh Patel <utkarsh.h.patel@...el.com>
---
Changes in v2:
- This change is being added as new patch in this series.

 include/linux/usb/pd_vdo.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/usb/pd_vdo.h b/include/linux/usb/pd_vdo.h
index b057250704e8..3a747938cdab 100644
--- a/include/linux/usb/pd_vdo.h
+++ b/include/linux/usb/pd_vdo.h
@@ -376,6 +376,7 @@
 	 | ((vbm) & 0x3) << 9 | (sbu) << 8 | (sbut) << 7 | ((cur) & 0x3) << 5	\
 	 | (vbt) << 4 | (sopp) << 3 | ((spd) & 0x7))
 
+#define VDO_TYPEC_CABLE_SPEED(vdo)	((vdo) & 0x7)
 #define VDO_TYPEC_CABLE_TYPE(vdo)	(((vdo) >> 18) & 0x3)
 
 /*
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ