I'm looking for an example kernel module that does i2c reads and writes where iMX8M Mini is in slave mode and where the reads and writes are interrupt based. The only remotely related sample seems to be:
mxc_i2c_slave_test.c\mxc_i2c_slave_test\test - imx-test - i.MX Driver Test Application Software
but this doesn't quite do what I want. Could someone please give me some pointers?
Hello,
Unfortunately, we cannot help you here since the i.MX8M mini is still in preproduction and we do not have access to all the information about the product. In this case, I highly recommend you to go with your FAE they for sure will help you. I apologize for the inconveniences this could give you.
Best Regards,
Diego.
Hi Diego - Any updates on this?
From what I've read so far, the client driver example here (pointed to by https://www.kernel.org/doc/Documentation/i2c/slave-interface):
linux/i2c-slave-eeprom.c at master · torvalds/linux · GitHub
is somewhat relevant. This assumes a user space instantiation of the i2c client device though.
https://www.kernel.org/doc/Documentation/i2c/instantiating-devices seems to describe how to do this for when the Linux i2c driver is acting as master. At least as far as I can tell.
I need a way of instantiating a kernel space i2c client (slave) whose address I can set as part of struct i2c_client and having my driver callback be called by i2c core when the imx-i2c driver generates an interrupt.