diff options
author | Jeremy Kerr <jk@codeconstruct.com.au> | 2023-10-13 07:06:24 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-10-17 13:45:03 +0300 |
commit | 0ac6486e5cbd1af682d3b52fcd3615247e13cb57 (patch) | |
tree | 7d47c08b6f6af073616b029810cc17051a1f32f5 /include/linux/i3c | |
parent | ee71d6d5f18b55cbba20c84cce13519f7bb509e6 (diff) | |
download | linux-0ac6486e5cbd1af682d3b52fcd3615247e13cb57.tar.xz |
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.h | 11 |
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 */ |