Most of races are fixed already. There were some issues with interrupt latencies - sometimes slave interrupt appears in process of starting master xfer.There are might be race conditions.Can you name them
Since imx doesn't generate interrupt on "bus stop" condition we'd had to implement polling scheme. Interrupts are used for starting polling and for waking polling loop on new slave request. Without polling we can't handle "end-of-packet" event correctly.+enum imx_i2c_slave_state {Highlevel question first: Why do you have polling? Why would anyone not
+ I2C_IMX_SLAVE_IDLE,
+ I2C_IMX_SLAVE_IRQ,
+ I2C_IMX_SLAVE_POLLING
want to use interrupts here?