Messages in this thread | | | From | Biwen Li <> | Subject | RE: [EXT] Re: i2c: imx: support slave mode for imx I2C driver | Date | Mon, 12 Aug 2019 04:22:03 +0000 |
| |
> On Fri, Aug 09, 2019 at 03:18:01AM +0000, Biwen Li wrote: > > > > The patch supports slave mode for imx I2C driver > > > > > > > > Signed-off-by: Biwen Li <biwen.li@nxp.com> > > > > > > Wow, this is much simpler than the other approach flying around: > > > > > > http://patchwork.ozlabs.org/patch/1124048/ > > > > > > Can this one be master and slave on the same bus, too? > > At the same time, the same bus is in master mode or slave mode. > > So, can someone kindly point out the key differences to me? The I2C module cannot be a master and a slave simultaneously. Such as: if the i2c module is used in slave mode with command 'echo slave-24c02 0x64 > /sys/bus/i2c/devices/i2c-0/new_device', At the mean time, you cannot do master operations(i2cset/i2cget). You can switch mode from slave to master with command 'echo 0x64 > /sys/bus/i2c/devices/i2c-0/delete_device', then you can do master operations.
Adding Leo to this version too.
| |