Re[2]: IIO driver module doesn't load automatically on kernel 4.19

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lars-Peter.

Many thanks for your help. I think you've identified where the problem lies. The behavior I'm seeing from the system on boot-up doesn't seem to match that described in the patch, though. Either there have been additional changes, or the description is inaccurate. Specifically, the author writes, "This patch changes the I2C core to report an OF related MODALIAS uevent if the device was registered via OF," but it appears that an OF MODALIAS event will be reported even if the driver did *not* register via OF. Adding an of_device_id table to the i2c_driver struct seems to cure the problem. At any rate, it's definitely not an IIO-related issue. I also found the same problem with the w1/masters/ds2482 driver. I suspect there are more in-tree drivers that have been broken by this change.
Vielen Dank,

-Nick

------ Original Message ------
From: "Lars-Peter Clausen" <lars@xxxxxxxxxx>
To: "Nick Burkitt" <nick.burkitt@xxxxxxxxxxx>; linux-iio@xxxxxxxxxxxxxxx
Sent: 1/30/2020 12:44:22 PM
Subject: Re: IIO driver module doesn't load automatically on kernel 4.19

On 1/29/20 9:25 PM, Nick Burkitt wrote:
Hi All.

Pardon me if I'm in the wrong place, but I have to start somewhere.
I'm using an IIO driver (based on the BNO055 driver proposed by Vlad Dogaru back in 2016).
All was well for a couple of years, but after I updated my kernel from 4.14 to 4.19, my driver will no longer load on boot, but is still happy to be loaded manually with modprobe.
All other drivers load normally.
Has something changed in the way IIO drivers register themselves? Or has some other requirement been added since 4.14 that I have to add to my driver?
If not, any suggestions on where to go next would be appreciated.

Details:
Xilinx Zynq-7000 (ARM Cortex-A9, 2 cores@866 MHz), 1 GB RAM
Linux v4.19.0 (via Xilinx)
Ubuntu 16.04 and 18.04 (both exhibit the same problem)

Hi,

There shouldn't really be a IIO specific reason why it does not work anymore.

Modules for devices are loaded based on the bus that the device is connected to. For sensors typically the I2C or SPI bus.

I had a quick look at what changed in the I2C core that could have broken this and it could maybe be this commit:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af503716ac1444db61d80cb6d17cfe62929c21df

The commit message warns that the change might break out-of-tree drivers that do not have a OF device table. You can fix the issue by adding such a table.

- Lars




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux