From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Vadim Pasternak <vadimp@nvidia.com>
Cc: hdegoede@redhat.com, platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH platform-next 12/16] platform: mellanox: mlx-platform: Get interrupt line through ACPI
Date: Mon, 14 Aug 2023 16:53:23 +0300 (EEST) [thread overview]
Message-ID: <6472b24-cd9a-4fde-5a0-881fb557fcb3@linux.intel.com> (raw)
In-Reply-To: <20230814085910.56069-13-vadimp@nvidia.com>
On Mon, 14 Aug 2023, Vadim Pasternak wrote:
> Add support for getting system interrupt line from ACPI table.
>
> Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
> Reviewed-by: Michael Shych <michaelsh@nvidia.com>
> ---
> drivers/platform/x86/mlx-platform.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
> index e2226c218a54..a70b86e60721 100644
> --- a/drivers/platform/x86/mlx-platform.c
> +++ b/drivers/platform/x86/mlx-platform.c
> @@ -342,6 +342,7 @@
> * @hotplug_resources: system hotplug resources
> * @hotplug_resources_size: size of system hotplug resources
> * @hi2c_main_init_status: init status of I2C main bus
> + * @irq_fpga: FPGA IRQ number
> */
> struct mlxplat_priv {
> struct platform_device *pdev_i2c;
> @@ -355,6 +356,7 @@ struct mlxplat_priv {
> struct resource *hotplug_resources;
> unsigned int hotplug_resources_size;
> u8 i2c_main_init_status;
> + int irq_fpga;
> };
>
> static struct platform_device *mlxplat_dev;
> @@ -6187,6 +6189,8 @@ static int mlxplat_post_init(struct mlxplat_priv *priv)
> /* Add hotplug driver */
> if (mlxplat_hotplug) {
> mlxplat_hotplug->regmap = priv->regmap;
> + if (priv->irq_fpga)
> + mlxplat_hotplug->irq = priv->irq_fpga;
> priv->pdev_hotplug =
> platform_device_register_resndata(&mlxplat_dev->dev,
> "mlxreg-hotplug", PLATFORM_DEVID_NONE,
> @@ -6395,11 +6399,17 @@ 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;
> + int irq_fpga = 0, i, err;
>
> - if (ACPI_COMPANION(&pdev->dev))
> + acpi_dev = ACPI_COMPANION(&pdev->dev);
> + if (acpi_dev) {
Just add this intermediate variable in the previous patch to have less
churn in this patch.
--
i.
> + irq_fpga = acpi_dev_gpio_irq_get(acpi_dev, 0);
> + if (irq_fpga < 0)
> + return -ENODEV;
> mlxplat_dev = pdev;
> + }
>
> err = mlxplat_pre_init(&hotplug_resources, &hotplug_resources_size);
> if (err)
> @@ -6414,6 +6424,7 @@ static int mlxplat_probe(struct platform_device *pdev)
> platform_set_drvdata(mlxplat_dev, priv);
> priv->hotplug_resources = hotplug_resources;
> priv->hotplug_resources_size = hotplug_resources_size;
> + priv->irq_fpga = irq_fpga;
>
> if (!mlxplat_regmap_config)
> mlxplat_regmap_config = &mlxplat_mlxcpld_regmap_config;
>
next prev parent reply other threads:[~2023-08-14 13:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 8:58 [PATCH platform-next 00/16] Add new features and amendments for Nvidia systems Vadim Pasternak
2023-08-14 8:58 ` [PATCH platform-next 01/16] platform: mellanox: Add new attributes Vadim Pasternak
2023-08-14 8:58 ` [PATCH platform-next 02/16] platform: mellanox: Add field upgrade capability register Vadim Pasternak
2023-08-14 8:58 ` [PATCH platform-next 03/16] platform: mellanox: Modify reset causes description Vadim Pasternak
2023-08-14 13:40 ` Ilpo Järvinen
2023-08-14 8:58 ` [PATCH platform-next 04/16] platform: mellanox: mlx-platform: Modify health and power hotplug action Vadim Pasternak
2023-08-14 8:58 ` [PATCH platform-next 05/16] platform: mellanox: mlx-platform: Add reset cause attribute Vadim Pasternak
2023-08-14 8:59 ` [PATCH platform-next 06/16] platform: mellanox: mlx-platform: add support for additional CPLD Vadim Pasternak
2023-08-14 8:59 ` [PATCH platform-next 07/16] platform: mellanox: mlx-platform: Modify power off callback Vadim Pasternak
2023-08-14 13:43 ` Ilpo Järvinen
2023-08-14 8:59 ` [PATCH platform-next 08/16] platform: mellanox: Cosmetic changes Vadim Pasternak
2023-08-14 13:46 ` Ilpo Järvinen
2023-08-14 8:59 ` [PATCH platform-next 09/16] platform: mellanox: mlx-platform: Add reset callback Vadim Pasternak
2023-08-14 13:49 ` Ilpo Järvinen
2023-08-14 8:59 ` [PATCH platform-next 10/16] platform: mellanox: mlx-platform: Prepare driver to allow probing through ACPI infrastructure Vadim Pasternak
2023-08-14 8:59 ` [PATCH platform-next 11/16] platform: mellanox: mlx-platform: Introduce ACPI init flow Vadim Pasternak
2023-08-14 8:59 ` [PATCH platform-next 12/16] platform: mellanox: mlx-platform: Get interrupt line through ACPI Vadim Pasternak
2023-08-14 13:53 ` Ilpo Järvinen [this message]
2023-08-14 8:59 ` [PATCH platform-next 13/16] platform: mellanox: Add initial support for PCIe based programming logic device Vadim Pasternak
2023-08-14 14:07 ` Ilpo Järvinen
2023-08-14 8:59 ` [PATCH platform-next 14/16] platform/mellanox: mlxreg-hotplug: Extend condition for notification callback processing Vadim Pasternak
2023-08-14 8:59 ` [PATCH platform-next 15/16] platform: mellanox: nvsw-sn2201: change fans i2c busses Vadim Pasternak
2023-08-14 8:59 ` [PATCH platform-next 16/16] Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Vadim Pasternak
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=6472b24-cd9a-4fde-5a0-881fb557fcb3@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=vadimp@nvidia.com \
/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