Messages in this thread Patch in this message | | | From | Prashant Malani <> | Subject | [RFC PATCH 1/3] usb: pd: Increase max PDO objects to 13 | Date | Thu, 2 Sep 2021 14:34:58 -0700 |
| |
Increase the max number of PDO objects to 13, to accommodate the extra PDOs added as a part of EPR (Extended Power Range) operation introduced in the USB PD Spec Rev 3.1, v 1.0. See Figure 6-54 for details.
Signed-off-by: Prashant Malani <pmalani@chromium.org> --- include/linux/usb/pd.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/linux/usb/pd.h b/include/linux/usb/pd.h index 96b7ff66f074..7e8bdca1ce6e 100644 --- a/include/linux/usb/pd.h +++ b/include/linux/usb/pd.h @@ -201,7 +201,13 @@ struct pd_message { } __packed; /* PDO: Power Data Object */ -#define PDO_MAX_OBJECTS 7 + +/* + * The EPR (Extended Power Range) structure is a superset of the SPR (Standard Power Range) + * capabilities structure, so set the max number of PDOs to 13 instead of 7. On SPR-only systems, + * objects 8 through 13 will just be empty. + */ +#define PDO_MAX_OBJECTS 13 enum pd_pdo_type { PDO_TYPE_FIXED = 0, -- 2.33.0.153.gba50c8fa24-goog
| |