linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IIO driver module doesn't load automatically on kernel 4.19
@ 2020-01-29 20:25 Nick Burkitt
  2020-01-30 20:44 ` Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Burkitt @ 2020-01-29 20:25 UTC (permalink / raw)
  To: linux-iio

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)

Thanks,

-Nick


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: IIO driver module doesn't load automatically on kernel 4.19
  2020-01-29 20:25 IIO driver module doesn't load automatically on kernel 4.19 Nick Burkitt
@ 2020-01-30 20:44 ` Lars-Peter Clausen
  2020-01-31 16:46   ` Re[2]: " Nick Burkitt
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2020-01-30 20:44 UTC (permalink / raw)
  To: Nick Burkitt, linux-iio

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re[2]: IIO driver module doesn't load automatically on kernel 4.19
  2020-01-30 20:44 ` Lars-Peter Clausen
@ 2020-01-31 16:46   ` Nick Burkitt
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Burkitt @ 2020-01-31 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, linux-iio

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@metafoo.de>
To: "Nick Burkitt" <nick.burkitt@nanotok.com>; linux-iio@vger.kernel.org
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-31 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29 20:25 IIO driver module doesn't load automatically on kernel 4.19 Nick Burkitt
2020-01-30 20:44 ` Lars-Peter Clausen
2020-01-31 16:46   ` Re[2]: " Nick Burkitt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).