mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
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. Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com> Link: https://lore.kernel.org/r/20230920023243.2494410-4-utkarsh.h.patel@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c365b1e1f4
commit
f9ee604328
@ -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)
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user