event: Add events for device probe/remove
Generate events when devices are probed or removed, allowing hooks
to be added for these situations.
This is controlled by the DM_EVENT config option.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/event.h b/include/event.h
index effd58c..f4c12d7 100644
--- a/include/event.h
+++ b/include/event.h
@@ -19,6 +19,12 @@
EVT_NONE,
EVT_TEST,
+ /* Events related to driver model */
+ EVT_DM_PRE_PROBE,
+ EVT_DM_POST_PROBE,
+ EVT_DM_PRE_REMOVE,
+ EVT_DM_POST_REMOVE,
+
EVT_COUNT
};
@@ -31,6 +37,15 @@
struct event_data_test {
int signal;
} test;
+
+ /**
+ * struct event_dm - driver model event
+ *
+ * @dev: Device this event relates to
+ */
+ struct event_dm {
+ struct udevice *dev;
+ } dm;
};
/**