aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/i3c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@codeconstruct.com.au>2023-10-13 12:06:24 +0800
committerPaolo Abeni <pabeni@redhat.com>2023-10-17 12:45:03 +0200
commit0ac6486e5cbd1af682d3b52fcd3615247e13cb57 (patch)
tree7d47c08b6f6af073616b029810cc17051a1f32f5 /include/linux/i3c
parentdt-bindings: i3c: Add mctp-controller property (diff)
downloadwireguard-linux-0ac6486e5cbd1af682d3b52fcd3615247e13cb57.tar.xz
wireguard-linux-0ac6486e5cbd1af682d3b52fcd3615247e13cb57.zip
i3c: Add support for bus enumeration & notification
This allows other drivers to be notified when new i3c busses are attached, referring to a whole i3c bus as opposed to individual devices. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/i3c')
-rw-r--r--include/linux/i3c/master.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h
index 0b52da4f2346..db909ef79be4 100644
--- a/include/linux/i3c/master.h
+++ b/include/linux/i3c/master.h
@@ -24,6 +24,12 @@
struct i2c_client;
+/* notifier actions. notifier call data is the struct i3c_bus */
+enum {
+ I3C_NOTIFY_BUS_ADD,
+ I3C_NOTIFY_BUS_REMOVE,
+};
+
struct i3c_master_controller;
struct i3c_bus;
struct i3c_device;
@@ -652,4 +658,9 @@ void i3c_master_queue_ibi(struct i3c_dev_desc *dev, struct i3c_ibi_slot *slot);
struct i3c_ibi_slot *i3c_master_get_free_ibi_slot(struct i3c_dev_desc *dev);
+void i3c_for_each_bus_locked(int (*fn)(struct i3c_bus *bus, void *data),
+ void *data);
+int i3c_register_notifier(struct notifier_block *nb);
+int i3c_unregister_notifier(struct notifier_block *nb);
+
#endif /* I3C_MASTER_H */