On Wed, Sep 24, 2014 at 04:27:02PM +0100, bruce bushby wrote: > Quick update in case it help somebody else. > > Big thank you to selsinork for some valuable tips and pointers. > > As it turns out, you don't need a DTS entry to add an I2C child > node/device. I removed my DTS child node entries in case they were > breaking things, booted the board and then manually added the device > and kernel driver. > > Although my driver still doesn't work, I am able to see the debug > messages which is great. > > > Shell session: First I confirm I can see and query the I2C device > using i2ctools, then instantiate the device and then load the > module...which fails, but at least explains where it's failing. > > # lsmod > Module Size Used by Not tainted > # > # > # > # i2cdetect -y 0 > 0 1 2 3 4 5 6 7 8 9 a b c d e f > 00: -- -- -- -- -- -- -- -- -- -- -- -- -- > 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > 30: -- -- -- -- 34 -- -- -- -- -- -- -- -- -- -- -- > 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > 60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- -- -- > 70: -- -- -- -- -- -- -- 77 > # > # > # > # i2cget -y 0 0x69 0x75 > 0x71 > # > # > # > # echo mpu9250 0x69 > /sys/bus/i2c/devices/i2c-0/new_device > [ 55.362493] i2c i2c-0: new_device: Instantiated device mpu9250 at 0x69 > # > # modprobe inv-mpu-iio > [ 77.347200] inv-mpu-iio 0-0069: Unable to read axis_map_x > [ 77.352699] i2c i2c-0: inv_mpu_probe failed -22 > [ 77.357254] inv-mpu-iio: probe of 0-0069 failed with error -5 > #
Without having the code, it's hard to say, but it definitely looks like you're missing some DT properties (and hence, have to create a node for your device). Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
signature.asc
Description: Digital signature
