BMI160-I2C driver : Mangoh red with wp77xx

I succeeded in building and loading the BMI160 kernel module on Mangoh Red but cannot find it under /sys/bus/i2c/devices/…

Steps followed:

  1. I copied the bmi160 kernel module from the Mangoh project: https://github.com/mangOH/mangOH/tree/master/linux_kernel_modules/bmi160 to my project
  2. I created a .sdef file in my project to point to the kernel modules copied
  3. I exported the sdef file using the SDEF_TO_USE variable
  4. make wp77xx; created a system.wp77xx.update file under $LEGATO_ROOT/build/wp77xx/
  5. update system.wp77xx.update 192.168.2.2
  6. On the Mangoh terminal: lsmod shows the bmi160_I2C and bmi160 loaded

no devices found under /sys/bus/i2c/devices/…
Any ideas whats going on?

The driver just provides the capability of supporting a device. Linux still doesn’t know that you actually have a bmi160 on your board. In Linux, this is typically achieved either through devicetree or platform code. Our platform code is in the mangoh_red_board.c file.

See: