提交 9d54fd6a 编写于 作者: H Hans de Goede 提交者: Marcel Holtmann

Bluetooth: hci_bcm: Make acpi_probe get irq from ACPI resources

The ACPI subsys is going to move over to instantiating ACPI enumerated
HCIs as serdevs, rather then as platform devices.

So we need to make bcm_acpi_probe() suitable for use on non platform-
devices too, which means that we cannot rely on platform_get_irq()
getting called.

This commit modifies bcm_acpi_probe() to directly get the irq from
the ACPI resources, this is a preparation patch for adding (runtime)pm
support to the serdev path.
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 42ef18f0
...@@ -751,8 +751,7 @@ static int bcm_resource(struct acpi_resource *ares, void *data) ...@@ -751,8 +751,7 @@ static int bcm_resource(struct acpi_resource *ares, void *data)
break; break;
} }
/* Always tell the ACPI core to skip this resource */ return 0;
return 1;
} }
#endif /* CONFIG_ACPI */ #endif /* CONFIG_ACPI */
...@@ -805,6 +804,7 @@ static int bcm_acpi_probe(struct bcm_device *dev) ...@@ -805,6 +804,7 @@ static int bcm_acpi_probe(struct bcm_device *dev)
const struct dmi_system_id *dmi_id; const struct dmi_system_id *dmi_id;
const struct acpi_gpio_mapping *gpio_mapping = acpi_bcm_int_last_gpios; const struct acpi_gpio_mapping *gpio_mapping = acpi_bcm_int_last_gpios;
const struct acpi_device_id *id; const struct acpi_device_id *id;
struct resource_entry *entry;
int ret; int ret;
/* Retrieve GPIO data */ /* Retrieve GPIO data */
...@@ -821,6 +821,13 @@ static int bcm_acpi_probe(struct bcm_device *dev) ...@@ -821,6 +821,13 @@ static int bcm_acpi_probe(struct bcm_device *dev)
&resources, bcm_resource, dev); &resources, bcm_resource, dev);
if (ret < 0) if (ret < 0)
return ret; return ret;
resource_list_for_each_entry(entry, &resources) {
if (resource_type(entry->res) == IORESOURCE_IRQ) {
dev->irq = entry->res->start;
break;
}
}
acpi_dev_free_resource_list(&resources); acpi_dev_free_resource_list(&resources);
dmi_id = dmi_first_match(bcm_active_low_irq_dmi_table); dmi_id = dmi_first_match(bcm_active_low_irq_dmi_table);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册