summaryrefslogtreecommitdiff
path: root/drivers/platform/x86
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/Kconfig1
-rw-r--r--drivers/platform/x86/mlx-platform.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 228fadb1c037..b94e23e84af0 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -965,6 +965,7 @@ config SERIAL_MULTI_INSTANTIATE
config MLX_PLATFORM
tristate "Mellanox Technologies platform support"
+ depends on ACPI
depends on I2C
select REGMAP
help
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 73f887614e04..7a15b918bf6e 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -6396,9 +6396,14 @@ static int mlxplat_probe(struct platform_device *pdev)
{
unsigned int hotplug_resources_size = 0;
struct resource *hotplug_resources = NULL;
+ struct acpi_device *acpi_dev;
struct mlxplat_priv *priv;
int i, err;
+ acpi_dev = ACPI_COMPANION(&pdev->dev);
+ if (acpi_dev)
+ mlxplat_dev = pdev;
+
err = mlxplat_pre_init(&hotplug_resources, &hotplug_resources_size);
if (err)
return err;
@@ -6476,9 +6481,16 @@ static int mlxplat_remove(struct platform_device *pdev)
return 0;
}
+static const struct acpi_device_id mlxplat_acpi_table[] = {
+ { "MLNXBF49", 0 },
+ {}
+};
+MODULE_DEVICE_TABLE(acpi, mlxplat_acpi_table);
+
static struct platform_driver mlxplat_driver = {
.driver = {
.name = "mlxplat",
+ .acpi_match_table = mlxplat_acpi_table,
.probe_type = PROBE_FORCE_SYNCHRONOUS,
},
.probe = mlxplat_probe,