I changed the order my kernel modules load (specifically the BMI160 and IIO) to match the Mango Red .mdef file and then they won’t load. I change the order back and then it works.
Old way that works in SDEF
// BMI160 accelerometer, NOTE: Order id important here
$PROJ_ROOT/drivers/bmi160/bmi160
$PROJ_ROOT/drivers/bmi160/bmi160-i2c
// Required for BMI160 NOTE: Order is important here
$PROJ_ROOT/drivers/iio/iio
$PROJ_ROOT/drivers/iio/iio-kfifo-buf
$PROJ_ROOT/drivers/iio/iio-triggered-buffer
Mangoh Red way that doesn’t work in SDEF
// BMI160 accelerometer, NOTE: Order id important here
$PROJ_ROOT/drivers/bmi160/bmi160-i2c
$PROJ_ROOT/drivers/bmi160/bmi160
// Required for BMI160 NOTE: Order is important here
$BRNKL_ROOT/drivers/iio/iio-triggered-buffer
$BRNKL_ROOT/drivers/iio/iio-kfifo-buf
$BRNKL_ROOT/drivers/iio/iio
Thoughts? Is there something I’m missing with the new method. I’m running Legato 18.09.0 on a WP85.
@dfrey Thanks I looked at that resource and it wasn’t much help. I have several of these dev_dbg statements but I don’t seem them in the dmesg or logread
The quick and dirty method is to raise the log level of the messages so that they do appear. I too have had issues with “debug” level messages and never really got to the bottom of it.
So what’s the difference between dev_info and printk? Any thoughts on my comments about moving away from the number based kernel module loading to the requires statements?
Hi, dev macros call into printk with the different levels as @dfrey mentioned.
They are the recommended way of printing log messages in device drivers
these days, just like pr_ are in many kernel subsystems. I think you may not be
seeing messages as if you look at your Kernel config it probably has this set:
CONFIG_DYNAMIC_DEBUG=y
This means you have to turn on you device debug messages on the target at
run-time on the fly as explained here: https://www.kernel.org/doc/html/v5.1/admin-guide/dynamic-debug-howto.html
There are also other reasons dev_dbg doesn’t print. Please see the kernel.org
docs for more details.
I’m unsure about the Legato module loading ordering issues, I’ll let @dfrey
pipe in on those once you get the log messages.