aboutsummaryrefslogtreecommitdiffstats
path: root/include/hw/i2c/i2c_mux_pca954x.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/i2c/i2c_mux_pca954x.h')
-rw-r--r--include/hw/i2c/i2c_mux_pca954x.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/hw/i2c/i2c_mux_pca954x.h b/include/hw/i2c/i2c_mux_pca954x.h
new file mode 100644
index 000000000..8aaf9bbc3
--- /dev/null
+++ b/include/hw/i2c/i2c_mux_pca954x.h
@@ -0,0 +1,19 @@
+#ifndef QEMU_I2C_MUX_PCA954X
+#define QEMU_I2C_MUX_PCA954X
+
+#include "hw/i2c/i2c.h"
+
+#define TYPE_PCA9546 "pca9546"
+#define TYPE_PCA9548 "pca9548"
+
+/**
+ * Retrieves the i2c bus associated with the specified channel on this i2c
+ * mux.
+ * @mux: an i2c mux device.
+ * @channel: the i2c channel requested
+ *
+ * Returns: a pointer to the associated i2c bus.
+ */
+I2CBus *pca954x_i2c_get_bus(I2CSlave *mux, uint8_t channel);
+
+#endif