usb: pd: fix the offset for SVID specific commands
Guenter Roeck
Reviewed-byQuoted 14 lines · Heikki Krogerus
The SVID specific commands in the Command field of the Structured VDM Header start from 16, not 10. Changing the value used in
VDO_CMD_VENDOR()macro from 10 to0x10.Signed-off-by Heikki Krogerus <[email protected]>--- include/linux/usb/pd_vdo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/usb/pd_vdo.h +0
-0
include/linux/usb/pd_vdo.h line 69
Quoted 6 lines
include/linux/usb/pd_vdo.h +1
-1@@ -65,7 +65,7 @@#define CMD_EXIT_MODE 5#define CMD_ATTENTION 6 -#define VDO_CMD_VENDOR (x) (((10 + (x)) & 0x1f)) +#define VDO_CMD_VENDOR (x) (((0x10 + (x)) & 0x1f))
Good catch. Bad part is that this originates from
https://chromium.googlesource.com/chromiumos/platform/ec,
which uses 10 as starting point. Nothing we can do about that.
Anyway,
Reviewed-by Guenter Roeck <[email protected]>
Quoted 5 lines
include/linux/usb/pd_vdo.h +0
-0/* ChromeOS specific commands */ #define VDO_CMD_VERSION VDO_CMD_VENDOR(0)Signature · 1 line
2.15.1
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html