The i2c-gpio.c in the linux kernel modified by me to find device through ACPI mode can't probe device defined in the DSDT.
The i2c-gpio.c code just use OF(device tree) to find device running in the xeon d1527,I modified my i2c-gpio.c and DSDT table, the i2c_gpio_driver is defined as struct platform_driver,and the name in struct acpi_device_id is "HHH000".For this name driver can't not probe acpi device.When HHH000 is substituted as PNP0C0C,it can probe.PNP0C0C device is defined in DSDT table originally,and PNP0C0C is shown in /sys/devices/platform/PNP0C0C:00/.So I thought how can my defined device shown in /sys/devices/platform,may it can probe.
my i2c-gpio.c driver is modified as follow:
#ifdef CONFIG_ACPI
static const struct acpi_device_id i2cgpio_acpi_match[] = {
{"HHH0000",0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, i2cgpio_acpi_match);
#endif
#if defined(CONFIG_OF)
static const struct of_device_id i2c_gpio_dt_ids[] = {
{ .compatible = "i2c-gpio", },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, i2c_gpio_dt_ids);
#endif
static struct platform_driver i2c_gpio_driver = {
.driver = {
.name = "my-i2c-gpio",
.of_match_table = of_match_ptr(i2c_gpio_dt_ids),
.acpi_match_table = ACPI_PTR(i2cgpio_acpi_match),
},
.probe = i2c_gpio_probe,
.remove = i2c_gpio_remove,
};
the dsdt I modified as follow:
Scope(\_SB.PCI0.LPC0)
{
Device (PCA9) /*pca9548*/
{
Name (_HID,"HHH0000")
}
}