diff options
author | Utkarsh Patel <utkarsh.h.patel@intel.com> | 2023-09-19 19:32:41 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-02 13:58:59 +0200 |
commit | f9ee6043283a78c84adf6ef3cef7a085eee4130f (patch) | |
tree | 33c3e20c8a881994630154737048d93166c068c7 /include/linux/usb | |
parent | c365b1e1f40499472433cc8fca3d0ea280ead52a (diff) | |
download | linux-f9ee6043283a78c84adf6ef3cef7a085eee4130f.tar.gz linux-f9ee6043283a78c84adf6ef3cef7a085eee4130f.tar.bz2 linux-f9ee6043283a78c84adf6ef3cef7a085eee4130f.zip |
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>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/pd_vdo.h | 1 |
1 files changed, 1 insertions, 0 deletions
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) /* |