On an iMX6ULL EVK board running Linux, How do I read the accelerometer ?
I have tried with i2c-tools the following:
i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- UU --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Accelerometer (Chip FXLS8471Q) is at address 0x1E but is shown as "skipped" above.
When I try a dump of the registers:
i2cdump -y -r 0x00-0x0D 0 0x1E b
Error: Could not set address to 0x1e: Device or resource busy
Which indicates that the i2c bus is held by a driver. So what driver and how do I access it ?
My search points to updating the kernel and removing the driver in questions. Which implies having to recompile the kernel and the board image which I would rather not do as the aim is to evaluate the accelerometer not the iMX6.
I also tried to access the i2c bus from u-boot and got an error -19.
Any help would be appreciated.
We decided not to pursue this path. The development effort of getting to the accelerometer is too important and there is absolutely no information to be found in the dev kit about reading it.
And indeed the -f option does not give us the accelerometer information only zeros.
try adding the -f (force) option. It tells the i2c tools to ignore whether or not there is a driver attached to that device. It requires superuser access.
Yes i had seen that. I tried and got no better results. I cannot give the
results here as i am not at the office until next monday.