diff options
author | Heikki Krogerus | 2019-02-01 13:47:54 +0300 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-02-08 10:25:12 +0100 |
commit | 382e8fa80da1571271faf1bd2220ac22cee13866 (patch) | |
tree | e4ca4f928352fde43afcfbdeb12aea88067ffe9d /include/linux/usb | |
parent | 25b0161450363ed7fe9fe618cda202e15817311a (diff) |
usb: typec: displayport: Move the Configuration VDO helpers to the header
The helpers used for reading and writing the pin assignment
from and to the Configuration VDO will be useful in GPU
drivers, and also UCSI driver after DisplayPort alt mode
support is added to it.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/typec_dp.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/typec_dp.h b/include/linux/usb/typec_dp.h index 55ae781d60a9..7fa12ef8d09a 100644 --- a/include/linux/usb/typec_dp.h +++ b/include/linux/usb/typec_dp.h @@ -92,4 +92,8 @@ enum { #define DP_CONF_PIN_ASSIGNEMENT_SHIFT 8 #define DP_CONF_PIN_ASSIGNEMENT_MASK GENMASK(15, 8) +/* Helper for setting/getting the pin assignement value to the configuration */ +#define DP_CONF_SET_PIN_ASSIGN(_a_) ((_a_) << 8) +#define DP_CONF_GET_PIN_ASSIGN(_conf_) (((_conf_) & GENMASK(15, 8)) >> 8) + #endif /* __USB_TYPEC_DP_H */ |