[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210902213500.3795948-2-pmalani@chromium.org>
Date: Thu, 2 Sep 2021 14:34:58 -0700
From: Prashant Malani <pmalani@...omium.org>
To: linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
linux-pm@...r.kernel.org, bleung@...omium.org,
heikki.krogerus@...ux.intel.com, badhri@...gle.com
Cc: Prashant Malani <pmalani@...omium.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sebastian Reichel <sre@...nel.org>
Subject: [RFC PATCH 1/3] usb: pd: Increase max PDO objects to 13
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@...omium.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
Powered by blists - more mailing lists