aboutsummaryrefslogtreecommitdiff
path: root/include/event.h
diff options
context:
space:
mode:
authorSimon Glass2022-03-04 08:43:03 -0700
committerTom Rini2022-03-10 08:28:36 -0500
commit5b896ed5856f768cdd55cdeb44c5f8f6b6a7a18a (patch)
tree427918a7828619a8620cd9b95d547539c9eb6733 /include/event.h
parent5a4219043d659514316e41d3d09866030c773e78 (diff)
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>
Diffstat (limited to 'include/event.h')
-rw-r--r--include/event.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/event.h b/include/event.h
index effd58c7047..f4c12d768b4 100644
--- a/include/event.h
+++ b/include/event.h
@@ -19,6 +19,12 @@ enum event_t {
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 @@ union event_data {
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;
};
/**