Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: intel_soc_pmic_crc: Add support for non ACPI instantiated i2c_client

On some x86 Bay Trail tablets which shipped with Android as factory OS,
the DSDT is so broken that the PMIC needs to be manually instantiated by
the special x86-android-tablets.ko "fixup" driver for cases like this.

Add an i2c_device_id table so that the driver can match on manually
instantiated i2c_client-s (which lack an ACPI fwnode to match on).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20241104150655.41402-3-hdegoede@redhat.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Hans de Goede and committed by
Lee Jones
7beb2261 521aa8bc

+7
+7
drivers/mfd/intel_soc_pmic_crc.c
··· 259 259 }; 260 260 MODULE_DEVICE_TABLE(acpi, crystal_cove_acpi_match); 261 261 262 + static const struct i2c_device_id crystal_cove_i2c_match[] = { 263 + { "intel_soc_pmic_crc" }, 264 + { } 265 + }; 266 + MODULE_DEVICE_TABLE(i2c, crystal_cove_i2c_match); 267 + 262 268 static struct i2c_driver crystal_cove_i2c_driver = { 263 269 .driver = { 264 270 .name = "intel_soc_pmic_crc", 265 271 .pm = pm_sleep_ptr(&crystal_cove_pm_ops), 266 272 .acpi_match_table = crystal_cove_acpi_match, 267 273 }, 274 + .id_table = crystal_cove_i2c_match, 268 275 .probe = crystal_cove_i2c_probe, 269 276 .remove = crystal_cove_i2c_remove, 270 277 .shutdown = crystal_cove_shutdown,