@@ -225,6 +225,7 @@ static int acpi_indirect_io_setup(struct acpi_device *adev)
/* All the host devices which apply indirect-IO can be listed here. */
static const struct acpi_device_id acpi_indirect_io_host_id[] = {
+ {"HISI0191"},
{}
};
@@ -439,7 +439,13 @@ static int hisilpc_probe(struct platform_device *pdev)
}
/* register the LPC host PIO resources */
- {
+ if (has_acpi_companion(dev)) {
+ lpcdev->io_host = find_io_range_by_fwnode(dev->fwnode);
+ if (!lpcdev->io_host) {
+ dev_err(dev, "range not registered!\n");
+ return -EFAULT;
+ }
+ } else {
struct logic_pio_hwaddr *range;
range = devm_kzalloc(dev, sizeof(*range), GFP_KERNEL);
@@ -496,10 +502,19 @@ static int hisilpc_probe(struct platform_device *pdev)
{},
};
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id hisilpc_acpi_match[] = {
+ {"HISI0191", },
+ {},
+};
+
+#endif
+
static struct platform_driver hisilpc_driver = {
.driver = {
.name = "hisi_lpc",
.of_match_table = hisilpc_of_match,
+ .acpi_match_table = ACPI_PTR(hisilpc_acpi_match),
},
.probe = hisilpc_probe,
};