X86 platform drivers
 help / color / mirror / Atom feed
From: Vadim Pasternak <vadimp@nvidia.com>
To: <hdegoede@redhat.com>
Cc: <ilpo.jarvinen@linux.intel.com>,
	<platform-driver-x86@vger.kernel.org>,
	Vadim Pasternak <vadimp@nvidia.com>
Subject: [PATCH platform-next v3 11/16] platform: mellanox: mlx-platform: Introduce ACPI init flow
Date: Tue, 22 Aug 2023 08:13:30 +0000	[thread overview]
Message-ID: <20230822081335.64344-12-vadimp@nvidia.com> (raw)
In-Reply-To: <20230822081335.64344-1-vadimp@nvidia.com>

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>
---
v1->v2:
- Comments pointed out by Ilpo:
  - Squash few lines from the next patch to this one to have less
    churn in next.
---
 drivers/platform/x86/mlx-platform.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 73f887614e04..feedfba0acf3 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 = ACPI_PTR(mlxplat_acpi_table),
 		.probe_type = PROBE_FORCE_SYNCHRONOUS,
 	},
 	.probe		= mlxplat_probe,
-- 
2.20.1


  parent reply	other threads:[~2023-08-22  8:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22  8:13 [PATCH platform-next v3 00/16] Add new features and amendments for Nvidia systems Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 01/16] platform: mellanox: Add new attributes Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 02/16] platform: mellanox: Add field upgrade capability register Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 03/16] platform: mellanox: Modify reset causes description Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 04/16] platform: mellanox: mlx-platform: Modify health and power hotplug action Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 05/16] platform: mellanox: mlx-platform: Add reset cause attribute Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 06/16] platform: mellanox: mlx-platform: add support for additional CPLD Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 07/16] platform: mellanox: mlx-platform: Modify power off callback Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 08/16] platform: mellanox: Cosmetic changes Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 09/16] platform: mellanox: mlx-platform: Add reset callback Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 10/16] platform: mellanox: mlx-platform: Prepare driver to allow probing through ACPI infrastructure Vadim Pasternak
2023-08-22  8:13 ` Vadim Pasternak [this message]
2023-08-22  8:13 ` [PATCH platform-next v3 12/16] platform: mellanox: mlx-platform: Get interrupt line through ACPI Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 13/16] platform: mellanox: Add initial support for PCIe based programming logic device Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 14/16] platform/mellanox: mlxreg-hotplug: Extend condition for notification callback processing Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 15/16] platform: mellanox: nvsw-sn2201: change fans i2c busses Vadim Pasternak
2023-08-22  8:13 ` [PATCH platform-next v3 16/16] Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Vadim Pasternak
2023-08-22  8:55   ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230822081335.64344-12-vadimp@nvidia.com \
    --to=vadimp@nvidia.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox