]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/i2c.h
I2C: adding new "i2c bus" Command to the I2C Subsystem.
[karo-tx-uboot.git] / include / i2c.h
index a6e797a3835e90ec2989607cc27520c1d3df46c9..9f771dda1057ac7bfe2df90bd97b49685c40dc5f 100644 (file)
@@ -85,6 +85,29 @@ void i2c_init(int speed, int slaveaddr);
 void i2c_init_board(void);
 #endif
 
+#if defined(CONFIG_I2C_MUX)
+
+typedef struct _mux {
+       uchar   chip;
+       uchar   channel;
+       char    *name;
+       struct _mux     *next;
+} I2C_MUX;
+
+typedef struct _mux_device {
+       int     busid;
+       I2C_MUX *mux;   /* List of muxes, to reach the device */
+       struct _mux_device      *next;
+} I2C_MUX_DEVICE;
+
+int    i2c_mux_add_device(I2C_MUX_DEVICE *dev);
+
+I2C_MUX_DEVICE *i2c_mux_search_device(int id);
+I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf);
+int i2x_mux_select_mux(int bus);
+int i2c_mux_ident_muxstring_f (uchar *buf);
+#endif
+
 /*
  * Probe the given I2C chip address.  Returns 0 if a chip responded,
  * not 0 on failure.