summaryrefslogtreecommitdiffstats
path: root/drivers/staging/typec/pd_vdo.h
diff options
context:
space:
mode:
authorGuenter Roeck2017-05-09 18:04:58 +0200
committerGreg Kroah-Hartman2017-05-15 11:23:56 +0200
commit193a68011fdc002cc03d6e6edabf941251df5690 (patch)
tree1d599882da171c7003dcc373ebc2b3e4846763a2 /drivers/staging/typec/pd_vdo.h
parentstaging: typec: tcpm: Set correct flags in PD request messages (diff)
downloadkernel-qcow2-linux-193a68011fdc002cc03d6e6edabf941251df5690.tar.gz
kernel-qcow2-linux-193a68011fdc002cc03d6e6edabf941251df5690.tar.xz
kernel-qcow2-linux-193a68011fdc002cc03d6e6edabf941251df5690.zip
staging: typec: tcpm: Respond to Discover Identity commands
If the lower level driver provided a list of VDOs in its configuration data, send it to the partner as response to a Discover Identity command if in device mode (UFP). Cc: Yueyao Zhu <yueyao.zhu@gmail.com> Originally-from: Puma Hsu <puma_hsu@htc.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/typec/pd_vdo.h')
-rw-r--r--drivers/staging/typec/pd_vdo.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/typec/pd_vdo.h b/drivers/staging/typec/pd_vdo.h
index dba172e0e0d1..d92259f8de0a 100644
--- a/drivers/staging/typec/pd_vdo.h
+++ b/drivers/staging/typec/pd_vdo.h
@@ -22,6 +22,9 @@
* VDM object is minimum of VDM header + 6 additional data objects.
*/
+#define VDO_MAX_OBJECTS 6
+#define VDO_MAX_SIZE (VDO_MAX_OBJECTS + 1)
+
/*
* VDM header
* ----------
@@ -34,7 +37,6 @@
* <5> :: reserved (SVDM), command type (UVDM)
* <4:0> :: command
*/
-#define VDO_MAX_SIZE 7
#define VDO(vid, type, custom) \
(((vid) << 16) | \
((type) << 15) | \