hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/usb/chipidea/ci.h
....@@ -204,6 +204,7 @@
204204 * @in_lpm: if the core in low power mode
205205 * @wakeup_int: if wakeup interrupt occur
206206 * @rev: The revision number for controller
207
+ * @mutex: protect code from concorrent running when doing role switch
207208 */
208209 struct ci_hdrc {
209210 struct device *dev;
....@@ -257,6 +258,7 @@
257258 bool in_lpm;
258259 bool wakeup_int;
259260 enum ci_revision rev;
261
+ struct mutex mutex;
260262 };
261263
262264 static inline struct ci_role_driver *ci_role(struct ci_hdrc *ci)