Linux Kernel not adding drivers

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

sephers2
Posts: 6
Joined: Mon Mar 05, 2018 12:28 am

Linux Kernel not adding drivers

Sat Oct 20, 2018 12:19 pm

Hi,

I've added the LM75 driver from Linux-AT91 menucofnig by selecting:

Code: Select all

Device Drivers -> Hardware Monitoring Support -> National Semiconductor LM75 and compatibiles 
I've then added it to my device tree under flx1: flexcom@f8038000:

Code: Select all

i2c2: i2c@600 {
	lm75@4c {
		compatible = "lm75";
		reg = <0x4c>;
		status = "okay";
	};
};
And on boot, if I do i2cdetect 2 I can see that address 0x4c has become UU and I can read the temperature from /sys/class/hwmon/hwmon0.

I then wanted to add support for the BMI160 (IIO > IMU > BMI160_I2C), and follow the same process. From menuconfig I selected IIO support including the device driver:

Code: Select all

Device Drivers -> Inductrial I/O support -> Inertial measurement units > Bosch BMI160 I2C driver 
and added the same into the device tree:

Code: Select all

i2c2: i2c@600 {
	lm75@4c {
		compatible = "lm75";
		reg = <0x4c>;
		status = "okay";
	};
	bmi160-i2c@68 {
		compatible = "bmi160-i2c";
		reg = <0x68>;
		status = "okay";
	};
};
However, Linux still loads the LM75 driver but not the BMI160 driver and I can't read any data from the device.

Is there something else I need to add to the DTB/menuconfig to get this working as it doesn't seem to be loading the BMI160 driver.

Thanks.
blue_z
Location: USA
Posts: 1785
Joined: Thu Apr 19, 2007 10:15 pm

Re: Linux Kernel not adding drivers

Mon Oct 22, 2018 1:50 am

sephers2 wrote: Linux Kernel not adding drivers
How would the Linux kernel "add" a driver?
Why do you use the plural "drivers" when you seem to only have an issue with just one driver?

What kernel source are you using?

sephers2 wrote: However, Linux still loads the LM75 driver but not the BMI160 driver and I can't read any data from the device.
...
it doesn't seem to be loading the BMI160 driver.
Are these drivers configured as loadable modules or built-in modules ?
A built-in driver is "loaded" as part of the kernel image.
Have you verified that the driver was compiled and linked into the kernel image (or built as a .ko file)?
Instead of "load", do you really mean "initialize"?

Have you even reviewed the boot log for salient messages?

From where are these compatible strings that you are using, i.e. "lm75" and "bmi160-i2c"?

Regards

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 2 guests