Commit a3dd034a authored by Andy Shevchenko's avatar Andy Shevchenko

ACPI / scan: Create platform device for INT3515 ACPI nodes

The ACPI device with INT3515 _HID is representing a complex USB PD
hardware infrastructure which includes several I2C slave ICs.

We add an ID to the I2C multi instantiate list to enumerate
all I2C slaves correctly.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 2336dfad
...@@ -1541,6 +1541,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) ...@@ -1541,6 +1541,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
static const struct acpi_device_id i2c_multi_instantiate_ids[] = { static const struct acpi_device_id i2c_multi_instantiate_ids[] = {
{"BSG1160", }, {"BSG1160", },
{"INT33FE", }, {"INT33FE", },
{"INT3515", },
{} {}
}; };
......
...@@ -159,12 +159,21 @@ static const struct i2c_inst_data bsg1160_data[] = { ...@@ -159,12 +159,21 @@ static const struct i2c_inst_data bsg1160_data[] = {
{} {}
}; };
static const struct i2c_inst_data int3515_data[] = {
{ "tps6598x", IRQ_RESOURCE_APIC, 0 },
{ "tps6598x", IRQ_RESOURCE_APIC, 1 },
{ "tps6598x", IRQ_RESOURCE_APIC, 2 },
{ "tps6598x", IRQ_RESOURCE_APIC, 3 },
{}
};
/* /*
* Note new device-ids must also be added to i2c_multi_instantiate_ids in * Note new device-ids must also be added to i2c_multi_instantiate_ids in
* drivers/acpi/scan.c: acpi_device_enumeration_by_parent(). * drivers/acpi/scan.c: acpi_device_enumeration_by_parent().
*/ */
static const struct acpi_device_id i2c_multi_inst_acpi_ids[] = { static const struct acpi_device_id i2c_multi_inst_acpi_ids[] = {
{ "BSG1160", (unsigned long)bsg1160_data }, { "BSG1160", (unsigned long)bsg1160_data },
{ "INT3515", (unsigned long)int3515_data },
{ } { }
}; };
MODULE_DEVICE_TABLE(acpi, i2c_multi_inst_acpi_ids); MODULE_DEVICE_TABLE(acpi, i2c_multi_inst_acpi_ids);
......
...@@ -501,19 +501,19 @@ static int tps6598x_remove(struct i2c_client *client) ...@@ -501,19 +501,19 @@ static int tps6598x_remove(struct i2c_client *client)
return 0; return 0;
} }
static const struct acpi_device_id tps6598x_acpi_match[] = { static const struct i2c_device_id tps6598x_id[] = {
{ "INT3515", 0 }, { "tps6598x" },
{ } { }
}; };
MODULE_DEVICE_TABLE(acpi, tps6598x_acpi_match); MODULE_DEVICE_TABLE(i2c, tps6598x_id);
static struct i2c_driver tps6598x_i2c_driver = { static struct i2c_driver tps6598x_i2c_driver = {
.driver = { .driver = {
.name = "tps6598x", .name = "tps6598x",
.acpi_match_table = tps6598x_acpi_match,
}, },
.probe_new = tps6598x_probe, .probe_new = tps6598x_probe,
.remove = tps6598x_remove, .remove = tps6598x_remove,
.id_table = tps6598x_id,
}; };
module_i2c_driver(tps6598x_i2c_driver); module_i2c_driver(tps6598x_i2c_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment