[Letux-kernel] bno055 driver posted by Vlad Dogaru
H. Nikolaus Schaller
hns at goldelico.com
Sat Jun 25 18:50:44 CEST 2016
Hi Andrey and Vlad,
> Am 25.06.2016 um 13:22 schrieb Andrey Utkin <andrey_utkin at fastmail.com>:
>
> On Fri, Jun 24, 2016 at 11:28:24PM +0200, H. Nikolaus Schaller wrote:
>> Great news!
>>
>> Is there some easy way to find these patches for download?
>> The ML isn't found on patchwork.kernel.org and people don't
>> copy to LKML.
>>
>> And/or is there a git repo to pull his patches?
>
> I have forwarded the patch emails to you personally. I hope it haven't
> got garbled.
Oh, great! Did work :) And compiles :) :)
First observation: DT support seems to be incomplete (table with .compatible strings is missing).
Here is a patch:
http://git.goldelico.com/?p=gta04-kernel.git;a=patch;h=f71d03191d21a93d9be45c01a548c4920906819f
http://git.goldelico.com/?p=gta04-kernel.git;a=commit;h=f71d03191d21a93d9be45c01a548c4920906819f
And here is my first test result on real hardware:
root at letux:~# dmesg|fgrep bno
[ 6.990535] driver_register 'bno055'
[ 6.995824] bno055 2-0029: failed to read operation mode, falling back to accel+gyro
[ 7.022921] bno055 2-0029: software revision id 0308
root at letux:~# ./findiio -a
bme280
bno055
palmas-gpadc
bmg160
tsc2007
root at letux:~# ./findiio bno055
/sys/bus/iio/devices/iio:device1
root at letux:~# ls -l /sys/bus/iio/devices/iio:device1/
total 0
-r--r--r-- 1 root root 4096 Jan 1 00:01 dev
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_accel_scale
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_accel_x_offset
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_accel_x_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_accel_y_offset
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_accel_y_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_accel_z_offset
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_accel_z_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_anglvel_scale
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_anglvel_x_offset
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_anglvel_x_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_anglvel_y_offset
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_anglvel_y_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_anglvel_z_offset
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_anglvel_z_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:01 in_temp_input
-r--r--r-- 1 root root 4096 Jan 1 00:01 name
lrwxrwxrwx 1 root root 0 Jan 1 00:01 of_node -> ../../../../../../../firmware/devicetree/base/ocp/i2c at 48060000/bno055 at 29
drwxr-xr-x 2 root root 0 Jan 1 00:01 power
lrwxrwxrwx 1 root root 0 Jan 1 00:01 subsystem -> ../../../../../../../bus/iio
-rw-r--r-- 1 root root 4096 Jan 1 00:01 uevent
root at letux:~# root at letux:~# cat /sys/bus/iio/devices/iio:device1/in_accel_*_raw
-68
117
966
root at letux:~# cat /sys/bus/iio/devices/iio:device1/in_accel_*_raw
-66
116
968
again, after rotating PCB by 90 degrees:
root at letux:~# cat /sys/bus/iio/devices/iio:device1/in_accel_*_raw
946
0
-105
root at letux:~#
So the driver (and the BNO chip) is doing something useful :)
>
> Also this happens to work even though it wasn't posted to the LKML:
>
> https://lkml.kernel.org/
> https://lkml.kernel.org/r/1466766936-20561-2-git-send-email-vlad.dogaru@intel.com
> https://lkml.kernel.org/g/1466766936-20561-2-git-send-email-vlad.dogaru@intel.com
Well, I had found similar pages, but it is very difficult to convert such web content
into a correct .patch file :(
Only patchwork.kernel.org has a nice "download mbox / patch", but it needs to be
listed there...
Anyways it did work and I hope this driver will appear in linux-next soon.
BR and thanks,
Nikolaus
More information about the Letux-kernel
mailing list