mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
platform: mellanox: mlx-platform: Introduce ACPI init flow
Introduce support for ACPI initialization flow - add ACPI match hook. Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Reviewed-by: Michael Shych <michaelsh@nvidia.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230822113451.13785-12-vadimp@nvidia.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
222954493c
commit
1316e0af2d
2 changed files with 13 additions and 0 deletions
|
@ -965,6 +965,7 @@ config SERIAL_MULTI_INSTANTIATE
|
||||||
|
|
||||||
config MLX_PLATFORM
|
config MLX_PLATFORM
|
||||||
tristate "Mellanox Technologies platform support"
|
tristate "Mellanox Technologies platform support"
|
||||||
|
depends on ACPI
|
||||||
depends on I2C
|
depends on I2C
|
||||||
select REGMAP
|
select REGMAP
|
||||||
help
|
help
|
||||||
|
|
|
@ -6396,9 +6396,14 @@ static int mlxplat_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
unsigned int hotplug_resources_size = 0;
|
unsigned int hotplug_resources_size = 0;
|
||||||
struct resource *hotplug_resources = NULL;
|
struct resource *hotplug_resources = NULL;
|
||||||
|
struct acpi_device *acpi_dev;
|
||||||
struct mlxplat_priv *priv;
|
struct mlxplat_priv *priv;
|
||||||
int i, err;
|
int i, err;
|
||||||
|
|
||||||
|
acpi_dev = ACPI_COMPANION(&pdev->dev);
|
||||||
|
if (acpi_dev)
|
||||||
|
mlxplat_dev = pdev;
|
||||||
|
|
||||||
err = mlxplat_pre_init(&hotplug_resources, &hotplug_resources_size);
|
err = mlxplat_pre_init(&hotplug_resources, &hotplug_resources_size);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
@ -6476,9 +6481,16 @@ static int mlxplat_remove(struct platform_device *pdev)
|
||||||
return 0;
|
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 = {
|
static struct platform_driver mlxplat_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "mlxplat",
|
.name = "mlxplat",
|
||||||
|
.acpi_match_table = mlxplat_acpi_table,
|
||||||
.probe_type = PROBE_FORCE_SYNCHRONOUS,
|
.probe_type = PROBE_FORCE_SYNCHRONOUS,
|
||||||
},
|
},
|
||||||
.probe = mlxplat_probe,
|
.probe = mlxplat_probe,
|
||||||
|
|
Loading…
Reference in a new issue