Re: [U-Boot] [PATCH V2] i2c: mxc: refactor i2c driver and support dm

2015-04-26 Thread Peng Fan
Please ignore this version, since bus_i2c_init is not good for DM, I'll implement a weak function for this. On 4/25/2015 9:04 PM, Peng Fan wrote: 1. Introduce a new structure `struct mxc_i2c_bus`, this structure will used for non-DM and DM. 1. Remove `struct mxc_i2c_regs` structure, but

[U-Boot] [PATCH V2] i2c: mxc: refactor i2c driver and support dm

2015-04-25 Thread Peng Fan
1. Introduce a new structure `struct mxc_i2c_bus`, this structure will used for non-DM and DM. 1. Remove `struct mxc_i2c_regs` structure, but use register offset to access registers based on `base` entry of `struct mxc_i2c_bus`. 2. Remove most `#ifdef I2C_QUIRK_REG`. Using driver_data to