Commit 96f984d3 authored by Hans de Goede's avatar Hans de Goede Committed by Andy Shevchenko

ACPI / scan: Create platform device for BSG2150 ACPI nodes

The Point of View TAB-P1006W-232-3G tablet has an ACPI firmware node with
a HID of BSG2150 describing the 2 Bosch sensors used in the device a
BMC150 compatible accelerometer and a BMC150 compatible magnetometer.

The ACPI firmware node actually contains 3 I2cSerialBusV2 resources,
but this seems to be a copy and paste job from the BSG1160 firmware node
on other devices, since there is no i2c-client listening to the 0x68
address listed in the third resource and the 0x68 address is identical
to the address of the third resource in the BSG1160 nodes, where as the
other 2 addresses are different.

Add the ID to the I2C multi instantiate list, so that the
i2c-multi-instantiate.c driver can handle it;

And add the necessary info to the i2c-multi-instantiate.c driver to
enumerate all I2C slaves correctly.

To avoid triggering the:

        if (i < multi->num_clients) {
                dev_err(dev, "Error finding driver, idx %d\n", i);

Error this commit lists the 3th device in the i2c_inst_data with a
type of "bsg2150_dummy_dev".
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent e7706a43
...@@ -1545,6 +1545,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) ...@@ -1545,6 +1545,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", },
{"BSG2150", },
{"INT33FE", }, {"INT33FE", },
{"INT3515", }, {"INT3515", },
{} {}
......
...@@ -159,6 +159,14 @@ static const struct i2c_inst_data bsg1160_data[] = { ...@@ -159,6 +159,14 @@ static const struct i2c_inst_data bsg1160_data[] = {
{} {}
}; };
static const struct i2c_inst_data bsg2150_data[] = {
{ "bmc150_accel", IRQ_RESOURCE_GPIO, 0 },
{ "bmc150_magn" },
/* The resources describe a 3th client, but it is not really there. */
{ "bsg2150_dummy_dev" },
{}
};
static const struct i2c_inst_data int3515_data[] = { static const struct i2c_inst_data int3515_data[] = {
{ "tps6598x", IRQ_RESOURCE_APIC, 0 }, { "tps6598x", IRQ_RESOURCE_APIC, 0 },
{ "tps6598x", IRQ_RESOURCE_APIC, 1 }, { "tps6598x", IRQ_RESOURCE_APIC, 1 },
...@@ -173,6 +181,7 @@ static const struct i2c_inst_data int3515_data[] = { ...@@ -173,6 +181,7 @@ static const struct i2c_inst_data int3515_data[] = {
*/ */
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 },
{ "BSG2150", (unsigned long)bsg2150_data },
{ "INT3515", (unsigned long)int3515_data }, { "INT3515", (unsigned long)int3515_data },
{ } { }
}; };
......
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