Troubleshooting an ACPI I2C driver that fails the match

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

 



Hi,
I'm new with kernel development so I might have done something stupid
during my troubleshooting procedure.

I'm trying to make working the Ambient Light Sensor on my old
Chromebook, this was working up to 4.15 but then something broke in
the chromeos_laptop driver. So now the people that are running an
alternative Chromebook firmware are using ACPI to load the right
modules instead of using the google SMBios table.
My first step was to create the ACPI node on coreboot with the i2c
hardware information. The ALS chip is the ISL29018 and the right
module should be this one:
https://elixir.bootlin.com/linux/v5.0.21/source/drivers/iio/light/isl29018.c#L810

According to tho the ACPI table of the driver the _HID should be
"ISL29018" we have created the DSDT:
https://github.com/MrChromebox/coreboot/blob/5a16469c9fb4131f04b2bc56da03fab0f2faf1bc/src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl#L163

The module is loaded, but nothing happens, so I have started with
ftrace to see if there was something wrong with the driver itself and
after some more tests I also started to build my own kernel with lots
of printk to know the parameters.

What I've discovered so far is:
i2c_device_probe() is not even called.
__acpi_match_device() fails to find a proper match. It is not scanning
the right ACPI/PNP from the DSDT. On the i2c bus the device also has
an Atmel touchscreen. It tries to match the Atmel TS, not the ALS. (It
fails the check here,
https://elixir.bootlin.com/linux/v4.18/source/drivers/acpi/bus.c#L783
device looks like it is NULL)

With that in mind and with the dmesg logs after "modprobe isl29018":
https://pastebin.com/84YzQ0GY
I have traced the problem up to the "acpi_primary_dev_companion()"
function. I think that that is the one that is returning NULL.
Talking with the COREBOOT guys the ACPI asl is correct and they have
no idea why the Linux kernel is failing to load that specific device.

For reference this is the touchpad dmesg , (as you will see the match
is found and the i2c device gets properly probed):
https://pastebin.com/PKiTKpD9

I have no more ideas to test out where the problem is. I've tried with
different kernel version all 4.18+

If someone has a suggestion/things to help me out with this issue I'm
facing it would be welcome.

Regards,
Nicolò




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux