From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, "Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
Lee Jones <lee@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Andreas Kemnade <andreas@kemnade.info>,
Kevin Hilman <khilman@baylibre.com>,
Roger Quadros <rogerq@kernel.org>,
Tony Lindgren <tony@atomide.com>,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
linux-mediatek@lists.infradead.org,
linux-arm-msm@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-omap@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH] mfd: Use dev_fwnode()
Date: Wed, 11 Jun 2025 12:43:41 +0200 [thread overview]
Message-ID: <20250611104348.192092-13-jirislaby@kernel.org> (raw)
In-Reply-To: <20250611104348.192092-1-jirislaby@kernel.org>
irq_domain_create_simple() takes fwnode as the first argument. It can be
extracted from the struct device using dev_fwnode() helper instead of
using of_node with of_fwnode_handle().
So use the dev_fwnode() helper.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Lee Jones <lee@kernel.org>
---
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Andreas Kemnade <andreas@kemnade.info>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Roger Quadros <rogerq@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: imx@lists.linux.dev
Cc: linux-mediatek@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-omap@vger.kernel.org
Cc: patches@opensource.cirrus.com
---
drivers/mfd/ab8500-core.c | 3 +--
drivers/mfd/fsl-imx25-tsadc.c | 4 ++--
drivers/mfd/lp8788-irq.c | 2 +-
drivers/mfd/mt6358-irq.c | 3 +--
drivers/mfd/mt6397-irq.c | 4 ++--
drivers/mfd/qcom-pm8xxx.c | 4 ++--
drivers/mfd/stmfx.c | 5 ++---
drivers/mfd/tps65217.c | 4 ++--
drivers/mfd/tps6586x.c | 6 +++---
drivers/mfd/twl6030-irq.c | 5 ++---
drivers/mfd/wm831x-irq.c | 10 ++++------
11 files changed, 22 insertions(+), 28 deletions(-)
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 049abcbd71ce..f0bc0b5a6f4a 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -580,8 +580,7 @@ static int ab8500_irq_init(struct ab8500 *ab8500, struct device_node *np)
num_irqs = AB8500_NR_IRQS;
/* If ->irq_base is zero this will give a linear mapping */
- ab8500->domain = irq_domain_create_simple(of_fwnode_handle(ab8500->dev->of_node),
- num_irqs, 0,
+ ab8500->domain = irq_domain_create_simple(dev_fwnode(ab8500->dev), num_irqs, 0,
&ab8500_irq_ops, ab8500);
if (!ab8500->domain) {
diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c
index d47152467951..0aab6428e042 100644
--- a/drivers/mfd/fsl-imx25-tsadc.c
+++ b/drivers/mfd/fsl-imx25-tsadc.c
@@ -71,8 +71,8 @@ static int mx25_tsadc_setup_irq(struct platform_device *pdev,
if (irq < 0)
return irq;
- tsadc->domain = irq_domain_create_simple(of_fwnode_handle(dev->of_node), 2, 0,
- &mx25_tsadc_domain_ops, tsadc);
+ tsadc->domain = irq_domain_create_simple(dev_fwnode(dev), 2, 0, &mx25_tsadc_domain_ops,
+ tsadc);
if (!tsadc->domain) {
dev_err(dev, "Failed to add irq domain\n");
return -ENOMEM;
diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c
index ea0fdf7a4b6e..f62fa2d7f010 100644
--- a/drivers/mfd/lp8788-irq.c
+++ b/drivers/mfd/lp8788-irq.c
@@ -161,7 +161,7 @@ int lp8788_irq_init(struct lp8788 *lp, int irq)
return -ENOMEM;
irqd->lp = lp;
- irqd->domain = irq_domain_create_linear(of_fwnode_handle(lp->dev->of_node), LP8788_INT_MAX,
+ irqd->domain = irq_domain_create_linear(dev_fwnode(lp->dev), LP8788_INT_MAX,
&lp8788_domain_ops, irqd);
if (!irqd->domain) {
dev_err(lp->dev, "failed to add irq domain err\n");
diff --git a/drivers/mfd/mt6358-irq.c b/drivers/mfd/mt6358-irq.c
index 9f0bcc3ad7a1..f467b00d2366 100644
--- a/drivers/mfd/mt6358-irq.c
+++ b/drivers/mfd/mt6358-irq.c
@@ -272,8 +272,7 @@ int mt6358_irq_init(struct mt6397_chip *chip)
irqd->pmic_ints[i].en_reg_shift * j, 0);
}
- chip->irq_domain = irq_domain_create_linear(of_fwnode_handle(chip->dev->of_node),
- irqd->num_pmic_irqs,
+ chip->irq_domain = irq_domain_create_linear(dev_fwnode(chip->dev), irqd->num_pmic_irqs,
&mt6358_irq_domain_ops, chip);
if (!chip->irq_domain) {
dev_err(chip->dev, "Could not create IRQ domain\n");
diff --git a/drivers/mfd/mt6397-irq.c b/drivers/mfd/mt6397-irq.c
index badc614b4345..0e463026c5a9 100644
--- a/drivers/mfd/mt6397-irq.c
+++ b/drivers/mfd/mt6397-irq.c
@@ -216,8 +216,8 @@ int mt6397_irq_init(struct mt6397_chip *chip)
regmap_write(chip->regmap, chip->int_con[2], 0x0);
chip->pm_nb.notifier_call = mt6397_irq_pm_notifier;
- chip->irq_domain = irq_domain_create_linear(of_fwnode_handle(chip->dev->of_node),
- MT6397_IRQ_NR, &mt6397_irq_domain_ops, chip);
+ chip->irq_domain = irq_domain_create_linear(dev_fwnode(chip->dev), MT6397_IRQ_NR,
+ &mt6397_irq_domain_ops, chip);
if (!chip->irq_domain) {
dev_err(chip->dev, "could not create irq domain\n");
return -ENOMEM;
diff --git a/drivers/mfd/qcom-pm8xxx.c b/drivers/mfd/qcom-pm8xxx.c
index c96ea6fbede8..1149f7102a36 100644
--- a/drivers/mfd/qcom-pm8xxx.c
+++ b/drivers/mfd/qcom-pm8xxx.c
@@ -559,8 +559,8 @@ static int pm8xxx_probe(struct platform_device *pdev)
chip->pm_irq_data = data;
spin_lock_init(&chip->pm_irq_lock);
- chip->irqdomain = irq_domain_create_linear(of_fwnode_handle(pdev->dev.of_node),
- data->num_irqs, &pm8xxx_irq_domain_ops, chip);
+ chip->irqdomain = irq_domain_create_linear(dev_fwnode(&pdev->dev), data->num_irqs,
+ &pm8xxx_irq_domain_ops, chip);
if (!chip->irqdomain)
return -ENODEV;
diff --git a/drivers/mfd/stmfx.c b/drivers/mfd/stmfx.c
index 823b1d29389e..f683fdb6ece6 100644
--- a/drivers/mfd/stmfx.c
+++ b/drivers/mfd/stmfx.c
@@ -269,9 +269,8 @@ static int stmfx_irq_init(struct i2c_client *client)
u32 irqoutpin = 0, irqtrigger;
int ret;
- stmfx->irq_domain = irq_domain_create_simple(of_fwnode_handle(stmfx->dev->of_node),
- STMFX_REG_IRQ_SRC_MAX, 0,
- &stmfx_irq_ops, stmfx);
+ stmfx->irq_domain = irq_domain_create_simple(dev_fwnode(stmfx->dev), STMFX_REG_IRQ_SRC_MAX,
+ 0, &stmfx_irq_ops, stmfx);
if (!stmfx->irq_domain) {
dev_err(stmfx->dev, "Failed to create IRQ domain\n");
return -EINVAL;
diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 4e9669d327b4..c240fac0ede7 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -158,8 +158,8 @@ static int tps65217_irq_init(struct tps65217 *tps, int irq)
tps65217_set_bits(tps, TPS65217_REG_INT, TPS65217_INT_MASK,
TPS65217_INT_MASK, TPS65217_PROTECT_NONE);
- tps->irq_domain = irq_domain_create_linear(of_fwnode_handle(tps->dev->of_node),
- TPS65217_NUM_IRQ, &tps65217_irq_domain_ops, tps);
+ tps->irq_domain = irq_domain_create_linear(dev_fwnode(tps->dev), TPS65217_NUM_IRQ,
+ &tps65217_irq_domain_ops, tps);
if (!tps->irq_domain) {
dev_err(tps->dev, "Could not create IRQ domain\n");
return -ENOMEM;
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index 853c48286071..8d5fe2b60bfa 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -363,9 +363,9 @@ static int tps6586x_irq_init(struct tps6586x *tps6586x, int irq,
new_irq_base = 0;
}
- tps6586x->irq_domain = irq_domain_create_simple(of_fwnode_handle(tps6586x->dev->of_node),
- irq_num, new_irq_base, &tps6586x_domain_ops,
- tps6586x);
+ tps6586x->irq_domain = irq_domain_create_simple(dev_fwnode(tps6586x->dev), irq_num,
+ new_irq_base, &tps6586x_domain_ops,
+ tps6586x);
if (!tps6586x->irq_domain) {
dev_err(tps6586x->dev, "Failed to create IRQ domain\n");
return -ENOMEM;
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index 00b14cef1dfb..df87b5168ae9 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -410,9 +410,8 @@ int twl6030_init_irq(struct device *dev, int irq_num)
atomic_set(&twl6030_irq->wakeirqs, 0);
twl6030_irq->irq_mapping_tbl = of_id->data;
- twl6030_irq->irq_domain =
- irq_domain_create_linear(of_fwnode_handle(dev->of_node), nr_irqs,
- &twl6030_irq_domain_ops, twl6030_irq);
+ twl6030_irq->irq_domain = irq_domain_create_linear(dev_fwnode(dev), nr_irqs,
+ &twl6030_irq_domain_ops, twl6030_irq);
if (!twl6030_irq->irq_domain) {
dev_err(dev, "Can't add irq_domain\n");
return -ENOMEM;
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index b3883fa5dd9f..defd5f173eb6 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -587,13 +587,11 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
}
if (irq_base)
- domain = irq_domain_create_legacy(of_fwnode_handle(wm831x->dev->of_node),
- ARRAY_SIZE(wm831x_irqs), irq_base, 0,
- &wm831x_irq_domain_ops, wm831x);
+ domain = irq_domain_create_legacy(dev_fwnode(wm831x->dev), ARRAY_SIZE(wm831x_irqs),
+ irq_base, 0, &wm831x_irq_domain_ops, wm831x);
else
- domain = irq_domain_create_linear(of_fwnode_handle(wm831x->dev->of_node),
- ARRAY_SIZE(wm831x_irqs), &wm831x_irq_domain_ops,
- wm831x);
+ domain = irq_domain_create_linear(dev_fwnode(wm831x->dev), ARRAY_SIZE(wm831x_irqs),
+ &wm831x_irq_domain_ops, wm831x);
if (!domain) {
dev_warn(wm831x->dev, "Failed to allocate IRQ domain\n");
--
2.49.0
next prev parent reply other threads:[~2025-06-11 10:44 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 10:43 [PATCH] mfd: fix building without CONFIG_OF Jiri Slaby (SUSE)
2025-06-11 10:43 ` [PATCH] pci: altera: remove unused 'node' variable Jiri Slaby (SUSE)
2025-06-13 15:41 ` Bjorn Helgaas
2025-06-11 10:43 ` [PATCH] bus: moxtet: Use dev_fwnode() Jiri Slaby (SUSE)
2025-06-17 8:00 ` Marek Behún
2025-06-11 10:43 ` [PATCH] drm/msm: use dev_fwnode() Jiri Slaby (SUSE)
2025-06-11 10:43 ` [PATCH] edac: Use dev_fwnode() Jiri Slaby (SUSE)
2025-06-11 10:43 ` [PATCH] gpio: " Jiri Slaby (SUSE)
2025-06-11 10:43 ` Jiri Slaby (SUSE)
2025-06-11 15:18 ` Andy Shevchenko
2025-06-11 15:18 ` Andy Shevchenko
2025-06-16 7:42 ` Bartosz Golaszewski
2025-06-16 7:42 ` Bartosz Golaszewski
2025-06-11 10:43 ` [PATCH] gpu: ipu-v3: " Jiri Slaby (SUSE)
2025-06-11 10:43 ` [PATCH] i2c: " Jiri Slaby (SUSE)
2025-06-27 10:54 ` Wolfram Sang
2025-06-11 10:43 ` [PATCH] iio: " Jiri Slaby (SUSE)
2025-06-11 13:57 ` David Lechner
2025-06-12 8:46 ` [PATCH v2] iio: adc: stm32-adc: " Jiri Slaby (SUSE)
2025-06-13 17:00 ` David Lechner
2025-06-14 11:08 ` Jonathan Cameron
2025-06-11 10:43 ` [PATCH] irqchip: " Jiri Slaby (SUSE)
2025-06-11 13:51 ` [Linux-stm32] " Antonio Borneo
2025-06-12 13:13 ` [tip: irq/drivers] " tip-bot2 for Jiri Slaby (SUSE)
2025-06-17 13:04 ` [PATCH] " Nishanth Menon
2025-06-11 10:43 ` [PATCH] mailbox: " Jiri Slaby (SUSE)
2025-06-11 10:43 ` [PATCH] memory: " Jiri Slaby (SUSE)
2025-06-12 11:34 ` Krzysztof Kozlowski
2025-06-12 11:38 ` Krzysztof Kozlowski
2025-06-12 11:39 ` Krzysztof Kozlowski
2025-06-11 10:43 ` Jiri Slaby (SUSE) [this message]
2025-06-12 8:48 ` [PATCH] mfd: " Charles Keepax
2025-06-19 11:34 ` (subset) " Lee Jones
2025-06-11 10:43 ` [PATCH] misc: " Jiri Slaby (SUSE)
2025-06-11 10:43 ` [PATCH] net: " Jiri Slaby (SUSE)
2025-06-13 2:00 ` patchwork-bot+netdevbpf
2025-06-11 10:43 ` [PATCH] pci/controller: " Jiri Slaby (SUSE)
2025-06-13 16:09 ` (subset) " Manivannan Sadhasivam
2025-07-15 18:49 ` Bjorn Helgaas
2025-07-16 7:59 ` Nam Cao
2025-07-16 14:49 ` Bjorn Helgaas
2025-07-21 17:08 ` Bjorn Helgaas
2025-07-22 6:24 ` Jiri Slaby
2025-07-22 23:20 ` Bjorn Helgaas
2025-07-23 6:47 ` Jiri Slaby
2025-06-11 10:43 ` [PATCH] pinctrl: " Jiri Slaby (SUSE)
2025-06-11 11:04 ` Chen-Yu Tsai
2025-06-18 11:32 ` Linus Walleij
2025-06-11 10:43 ` [PATCH] powerpc: " Jiri Slaby (SUSE)
2025-06-11 10:43 ` [PATCH] soc: " Jiri Slaby (SUSE)
2025-06-11 15:13 ` Thierry Reding
2025-06-12 11:31 ` Krzysztof Kozlowski
2025-06-12 12:28 ` Christophe Leroy
2025-07-08 8:33 ` Christophe Leroy
2025-07-30 13:37 ` Christophe Leroy
2025-06-11 10:43 ` [PATCH] thermal: " Jiri Slaby (SUSE)
2025-06-11 15:13 ` Thierry Reding
2025-07-15 13:33 ` Daniel Lezcano
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=20250611104348.192092-13-jirislaby@kernel.org \
--to=jirislaby@kernel.org \
--cc=aaro.koskinen@iki.fi \
--cc=alexandre.torgue@foss.st.com \
--cc=andreas@kemnade.info \
--cc=angelogioacchino.delregno@collabora.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=patches@opensource.cirrus.com \
--cc=rogerq@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.