My development board is an x86 based Intel Joule 570x. I have a BMM150 sensor connected on /dev/i2c-4 bus at address 0x13. I am able to communicate to this sensor using i2cget
.
Now I want to make use of the driver which is already present in IIO subsystem for this sensor. I have already built this driver as a module and put into the rootfs. I am also able to do modprobe to this driver. Now the problem is where can I define my sensor device such that kernel reads it and the probe of this driver is called(https://elixir.bootlin.com/linux/v5.0-rc7/source/drivers/iio/magnetometer/bmc150_magn_i2c.c)
Since in x86, I do not have device tree support and I do not want to use ACPI at this point, what is the other simple way so that I can define my I2C sensor connected, such that the drivers probe is called? I read that we can define device in board init files, but I could not find the exact files where I can do that?
Can someone please help me to define my i2c device into the kernel? An example will be highly appreciated.