linux-i3c.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: alexandre.belloni@bootlin.com
Cc: Frank.Li@nxp.com, linux-i3c@lists.infradead.org
Subject: [PATCH 09/13] i3c: mipi-i3c-hci-pci: Change callback parameter
Date: Wed, 12 Nov 2025 12:03:35 +0200	[thread overview]
Message-ID: <20251112100339.51726-10-adrian.hunter@intel.com> (raw)
In-Reply-To: <20251112100339.51726-1-adrian.hunter@intel.com>

Change ->init() callback parameter from a pointer to the PCI device to a
pointer to the locally defined mipi_i3c_hci_pci_info device information.
This is in preparation for consistency when adding more callbacks that will
need struct mipi_i3c_hci_pci_info.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c b/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
index 9fa89af7479f..5142dfcebe7d 100644
--- a/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
+++ b/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
@@ -15,11 +15,12 @@
 #include <linux/platform_device.h>
 
 struct mipi_i3c_hci_pci {
+	struct pci_dev *pci;
 	struct platform_device *pdev;
 };
 
 struct mipi_i3c_hci_pci_info {
-	int (*init)(struct pci_dev *pci);
+	int (*init)(struct mipi_i3c_hci_pci *hci);
 };
 
 static DEFINE_IDA(mipi_i3c_hci_pci_ida);
@@ -50,15 +51,15 @@ static void intel_reset(void __iomem *priv)
 	writel(INTEL_RESETS_RESET, priv + INTEL_RESETS);
 }
 
-static int intel_init(struct pci_dev *pci)
+static int intel_init(struct mipi_i3c_hci_pci *hci)
 {
-	void __iomem *priv = intel_priv(pci);
+	void __iomem *priv = intel_priv(hci->pci);
 	int ret;
 
 	if (!priv)
 		return -ENOMEM;
 
-	ret = dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(64));
+	ret = dma_set_mask_and_coherent(&hci->pci->dev, DMA_BIT_MASK(64));
 	if (ret)
 		return ret;
 
@@ -83,6 +84,8 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
 	if (!hci)
 		return -ENOMEM;
 
+	hci->pci = pci;
+
 	ret = pcim_enable_device(pci);
 	if (ret)
 		return ret;
@@ -116,7 +119,7 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
 
 	info = (const struct mipi_i3c_hci_pci_info *)id->driver_data;
 	if (info && info->init) {
-		ret = info->init(pci);
+		ret = info->init(hci);
 		if (ret)
 			goto err;
 	}
-- 
2.51.0


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  parent reply	other threads:[~2025-11-12 10:04 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 10:03 [PATCH 00/13] i3c: mipi-i3c-hci-pci: Add LTR support for Intel controllers Adrian Hunter
2025-11-12 10:03 ` [PATCH 01/13] i3c: mipi-i3c-hci-pci: Set 64-bit DMA mask " Adrian Hunter
2025-11-12 15:51   ` Frank Li
2025-11-12 10:03 ` [PATCH 02/13] i3c: mipi-i3c-hci-pci: Move all Intel-related definitions together Adrian Hunter
2025-11-12 15:53   ` Frank Li
2025-11-13 12:58     ` Adrian Hunter
2025-11-12 10:03 ` [PATCH 03/13] i3c: mipi-i3c-hci-pci: Rename some Intel-related identifiers Adrian Hunter
2025-11-12 15:57   ` Frank Li
2025-11-13 13:01     ` Adrian Hunter
2025-11-13 16:19       ` Frank Li
2025-11-13 16:57         ` Adrian Hunter
2025-11-13 17:17           ` Frank Li
2025-11-12 10:03 ` [PATCH 04/13] i3c: mipi-i3c-hci-pci: Use readl_poll_timeout() Adrian Hunter
2025-11-12 15:59   ` Frank Li
2025-11-14 16:02     ` Alexandre Belloni
2025-11-14 16:43       ` Frank Li
2025-11-14 17:20         ` Alexandre Belloni
2025-11-12 10:03 ` [PATCH 05/13] i3c: mipi-i3c-hci-pci: Constify driver data Adrian Hunter
2025-11-12 16:01   ` Frank Li
2025-11-12 10:03 ` [PATCH 06/13] i3c: mipi-i3c-hci-pci: Factor out private registers ioremapping Adrian Hunter
2025-11-12 16:09   ` Frank Li
2025-11-13 13:02     ` Adrian Hunter
2025-11-12 10:03 ` [PATCH 07/13] i3c: mipi-i3c-hci-pci: Factor out intel_reset() Adrian Hunter
2025-11-12 16:13   ` Frank Li
2025-11-12 10:03 ` [PATCH 08/13] i3c: mipi-i3c-hci-pci: Allocate a structure for mipi_i3c_hci_pci device information Adrian Hunter
2025-11-12 16:41   ` Frank Li
2025-11-12 19:25     ` Adrian Hunter
2025-11-12 20:17       ` Frank Li
2025-11-13 13:15         ` Adrian Hunter
2025-11-13 16:25           ` Frank Li
2025-11-12 10:03 ` Adrian Hunter [this message]
2025-11-12 10:03 ` [PATCH 10/13] i3c: mipi-i3c-hci-pci: Add exit callback Adrian Hunter
2025-11-12 10:03 ` [PATCH 11/13] i3c: mipi-i3c-hci-pci: Allocate a structure for Intel controller information Adrian Hunter
2025-11-12 10:03 ` [PATCH 12/13] i3c: mipi-i3c-hci-pci: Add LTR support for Intel controllers Adrian Hunter
2025-11-12 10:03 ` [PATCH 13/13] i3c: mipi-i3c-hci-pci: Set d3cold_delay to 0 " Adrian Hunter

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=20251112100339.51726-10-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-i3c@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).