linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nick Burkitt" <nick.burkitt@nanotok.com>
To: "Lars-Peter Clausen" <lars@metafoo.de>, linux-iio@vger.kernel.org
Subject: Re[2]: IIO driver module doesn't load automatically on kernel 4.19
Date: Fri, 31 Jan 2020 16:46:39 +0000	[thread overview]
Message-ID: <em73402834-5869-442b-96c8-3106fbc29dae@nanotok> (raw)
In-Reply-To: <7f063be8-d81a-19f6-6357-079c0a479d54@metafoo.de>

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


      reply	other threads:[~2020-01-31 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Nick Burkitt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=em73402834-5869-442b-96c8-3106fbc29dae@nanotok \
    --to=nick.burkitt@nanotok.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).