- * i2c_get_bus_num_fdt() - Compatibility function for driver model
- *
- * @return the bus number associated with the given device tree node
- */
-int i2c_get_bus_num_fdt(int node);
-
-/**
- * i2c_get_bus_num() - Compatibility function for driver model
- *
- * @return the 'current' bus number
- */
-unsigned int i2c_get_bus_num(void);
-
-/**
- * i2c_set_bus_num() - Compatibility function for driver model
- *
- * Sets the 'current' bus
- */
-int i2c_set_bus_num(unsigned int bus);
-
-static inline void I2C_SET_BUS(unsigned int bus)
-{
- i2c_set_bus_num(bus);
-}
-
-static inline unsigned int I2C_GET_BUS(void)
-{
- return i2c_get_bus_num();
-}
-
-/**
- * i2c_init() - Compatibility function for driver model
- *
- * This function does nothing.
- */
-void i2c_init(int speed, int slaveaddr);
-
-/**
- * board_i2c_init() - Compatibility function for driver model
- *
- * @param blob Device tree blbo
- * @return the number of I2C bus
- */
-void board_i2c_init(const void *blob);
-
-#endif
-
-/*
- * Not all of these flags are implemented in the U-Boot API
- */
-enum dm_i2c_msg_flags {
- I2C_M_TEN = 0x0010, /* ten-bit chip address */
- I2C_M_RD = 0x0001, /* read data, from slave to master */
- I2C_M_STOP = 0x8000, /* send stop after this message */
- I2C_M_NOSTART = 0x4000, /* no start before this message */
- I2C_M_REV_DIR_ADDR = 0x2000, /* invert polarity of R/W bit */
- I2C_M_IGNORE_NAK = 0x1000, /* continue after NAK */
- I2C_M_NO_RD_ACK = 0x0800, /* skip the Ack bit on reads */
- I2C_M_RECV_LEN = 0x0400, /* length is first received byte */
-};
-
-/**
- * struct i2c_msg - an I2C message
- *
- * @addr: Slave address
- * @flags: Flags (see enum dm_i2c_msg_flags)
- * @len: Length of buffer in bytes, may be 0 for a probe
- * @buf: Buffer to send/receive, or NULL if no data
- */
-struct i2c_msg {
- uint addr;
- uint flags;
- uint len;
- u8 *buf;
-};
-
-/**
- * struct i2c_msg_list - a list of I2C messages