Modify the MPU3050 driver in linux kernel (Android) to use MPU6050 -
i have device run (gsensor, mpu6050) android system. can't build directly because not exist 3.4 kernel, wonder if can modify mpu3050 driver device works.
i have found readme, wonder if work ?
edit: after half of work*, here part of dmesg
:
<7>[ 13.283019] i2c-core: driver [mpu3050] registered <6>[ 13.283119] init: command 'insmod' r=0 <4>[ 13.312403] industrialio: module staging directory, quality unknown, have been warned. <6>[ 13.315656] init: command 'insmod' r=0 <4>[ 13.320725] kfifo_buf: module staging directory, quality unknown, have been warned. <6>[ 13.321687] init: command 'insmod' r=0 <4>[ 13.329837] ring_sw: module staging directory, quality unknown, have been warned. <6>[ 13.330847] init: command 'insmod' r=0 <6>[ 13.354793] hub 4-0:1.0: [hub_activate 872] <4>[ 13.392922] inv_mpu_iio: module staging directory, quality unknown, have been warned. <7>[ 13.395860] i2c-core: driver [inv-mpu-iio] registered
i2ctools detect this:
# i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- uu -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: uu uu uu uu uu uu uu uu -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- # i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: uu uu uu uu uu uu uu uu -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- # i2cdetect -y 2 0 1 2 3 4 5 6 7 8 9 b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: uu uu uu uu uu uu uu uu -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- # i2cdump -f -y 2 0x68 no size specified (using byte-data access) 0 1 2 3 4 5 6 7 8 9 b c d e f 0123456789abcdef 00: 89 75 81 e1 1e 0f fb 1e fe 8d 00 a8 28 51 50 b9 ?u????????.?(qp? 10: 86 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?............... 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 60: 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 ...........@.... 70: 00 00 00 00 00 68 00 00 00 00 00 00 00 00 00 00 .....h.......... 80: 89 75 81 e1 1e 0f fb 1e fe 8d 00 a8 28 51 50 b9 ?u????????.?(qp? 90: 86 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?............... a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ e0: 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 ...........@.... f0: 00 00 00 00 00 68 00 00 00 00 00 00 00 00 00 00 .....h.......... # i2cget -f -y 2 0x68 0x75 # i2cget -f -y 2 0x68 0xe1 # i2cget -f -y 2 0x68 0x0f # i2cget -f -y 2 0x68 0x1e # i2cget -f -y 2 0x68 0x8d #
*just drivers has been compiled, kernel hasn't been modified. following here.
yes, can.
consult data sheets difference between capabilities , registers of each device, believe find mpu-6050 superset of mpu-3050 extending driver 1 accommodate other should simple case of programming-by-example.
your question asked borderline inappropriate here - stackoverflow exists provide assistance specific problems , have not stated actual issue beyond wondering if possible, answer given above yes, provided work , learn resources available you.
Comments
Post a Comment