i2c slave mode linux kernel module sample

cancel
Showing results for 
Search instead for 
Did you mean: 

i2c slave mode linux kernel module sample

2,414 Views
gowricp
Contributor II

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?

Tags (2)
0 Kudos
8 Replies

1,414 Views
diegoadrian
NXP Employee
NXP Employee

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.

0 Kudos

1,414 Views
gowricp
Contributor II

Thanks Diego. I have already written to the FAE. How about the i.MX8M Quad in that case?

0 Kudos

1,414 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

I am also reviewing this with your FAE and with the apps engineers if there is an example that could help you. Please, give me a moment until I could have an update.

Best regards,

Diego.

0 Kudos

1,414 Views
gowricp
Contributor II

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. 

0 Kudos

1,413 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Just to say that I am still reviewing the best solution of this with your FAE.

Best regards,

Diego.

0 Kudos

1,414 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Just to know if you have been contacted by your FAE lately. We have been looking for a solution together.

Best Regards,

Diego.

0 Kudos

1,414 Views
gowricp
Contributor II

Hi Diego - We have decided to not pursue this route for performance reasons so we no longer require a solution. Thanks so much for the effort.

0 Kudos

1,414 Views
gowricp
Contributor II

Sounds good. Thanks!

0 Kudos