From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Stefan Agner <stefan@agner.ch>,
Dong Aisheng <aisheng.dong@nxp.com>,
Jacky Bai <ping.bai@nxp.com>, Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
Peng Fan <peng.fan@nxp.com>,
Daniel Baluta <daniel.baluta@nxp.com>
Subject: [PATCH v3 05/11] gpio: vf610: drop unnecessary wrappers
Date: Thu, 05 Nov 2026 11:53:03 +0800 [thread overview]
Message-ID: <20261105-gpio-vf610-fixes-v3-5-504e19de5ad5@nxp.com> (raw)
In-Reply-To: <20261105-gpio-vf610-fixes-v3-0-504e19de5ad5@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
Remove trivial wrapper functions vf610_gpio_writel() and
vf610_gpio_readl() that just called the relaxed versions directly.
Replace their usage with direct calls to writel_relaxed() and
readl_relaxed().
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/gpio/gpio-vf610.c | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index d14cd5515293..0ef220eacd3b 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -82,16 +82,6 @@ static const struct of_device_id vf610_gpio_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, vf610_gpio_dt_ids);
-static inline void vf610_gpio_writel(u32 val, void __iomem *reg)
-{
- writel_relaxed(val, reg);
-}
-
-static inline u32 vf610_gpio_readl(void __iomem *reg)
-{
- return readl_relaxed(reg);
-}
-
static void vf610_gpio_irq_handler(struct irq_desc *desc)
{
struct vf610_gpio_port *port =
@@ -102,10 +92,10 @@ static void vf610_gpio_irq_handler(struct irq_desc *desc)
chained_irq_enter(chip, desc);
- irq_isfr = vf610_gpio_readl(port->base + PORT_ISFR);
+ irq_isfr = readl_relaxed(port->base + PORT_ISFR);
for_each_set_bit(pin, &irq_isfr, VF610_GPIO_PER_PORT) {
- vf610_gpio_writel(BIT(pin), port->base + PORT_ISFR);
+ writel_relaxed(BIT(pin), port->base + PORT_ISFR);
generic_handle_domain_irq(port->chip.gc.irq.domain, pin);
}
@@ -119,7 +109,7 @@ static void vf610_gpio_irq_ack(struct irq_data *d)
gpiochip_get_data(irq_data_get_irq_chip_data(d));
int gpio = d->hwirq;
- vf610_gpio_writel(BIT(gpio), port->base + PORT_ISFR);
+ writel_relaxed(BIT(gpio), port->base + PORT_ISFR);
}
static int vf610_gpio_irq_set_type(struct irq_data *d, u32 type)
@@ -165,7 +155,7 @@ static void vf610_gpio_irq_mask(struct irq_data *d)
irq_hw_number_t gpio_num = irqd_to_hwirq(d);
void __iomem *pcr_base = port->base + PORT_PCR(gpio_num);
- vf610_gpio_writel(0, pcr_base);
+ writel_relaxed(0, pcr_base);
gpiochip_disable_irq(gc, gpio_num);
}
@@ -177,8 +167,8 @@ static void vf610_gpio_irq_unmask(struct irq_data *d)
void __iomem *pcr_base = port->base + PORT_PCR(gpio_num);
gpiochip_enable_irq(gc, gpio_num);
- vf610_gpio_writel(port->irqc[gpio_num] << PORT_PCR_IRQC_OFFSET,
- pcr_base);
+ writel_relaxed(port->irqc[gpio_num] << PORT_PCR_IRQC_OFFSET,
+ pcr_base);
}
static int vf610_gpio_irq_set_wake(struct irq_data *d, u32 enable)
@@ -292,10 +282,10 @@ static int vf610_gpio_probe(struct platform_device *pdev)
/* Mask all GPIO interrupts */
for (i = 0; i < gc->ngpio; i++)
- vf610_gpio_writel(0, port->base + PORT_PCR(i));
+ writel_relaxed(0, port->base + PORT_PCR(i));
/* Clear the interrupt status register for all GPIO's */
- vf610_gpio_writel(~0, port->base + PORT_ISFR);
+ writel_relaxed(~0, port->base + PORT_ISFR);
girq = &gc->irq;
gpio_irq_chip_set_chip(girq, &vf610_irqchip);
--
2.51.0
next prev parent reply other threads:[~2026-11-05 3:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 3:52 [PATCH v3 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
2026-11-05 3:52 ` [PATCH v3 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC Peng Fan (OSS)
2026-11-05 12:30 ` Peng Fan
2026-11-05 17:22 ` Frank Li
2026-11-06 11:54 ` Krzysztof Kozlowski
2026-11-11 14:35 ` Rob Herring
2026-11-11 16:27 ` Frank Li
2026-11-05 3:53 ` [PATCH v3 02/11] gpio: vf610: simplify with irq_set_irq_wake() Peng Fan (OSS)
2026-11-05 17:23 ` Frank Li
2026-11-06 13:28 ` Linus Walleij
2026-11-05 3:53 ` [PATCH v3 03/11] gpio: vf610: use devm_clk_get_optional_enabled() for clock handling Peng Fan (OSS)
2026-11-05 17:25 ` Frank Li
2026-11-06 13:29 ` Linus Walleij
2026-11-05 3:53 ` [PATCH v3 04/11] gpio: vf610: drop unneeded header Peng Fan (OSS)
2026-11-05 3:53 ` Peng Fan (OSS) [this message]
2026-11-05 3:53 ` [PATCH v3 06/11] MAINTAINERS: Add VF610 GPIO driver support Peng Fan (OSS)
2026-11-05 3:53 ` [PATCH v3 07/11] arm64: dts: imx8ulp: fix gpio clocks Peng Fan (OSS)
2026-11-05 3:53 ` [PATCH v3 08/11] arm64: dts: imx93: " Peng Fan (OSS)
2026-11-05 3:53 ` [PATCH v3 09/11] arm64: dts: imx95: " Peng Fan (OSS)
2026-11-05 3:53 ` [PATCH v3 10/11] arm64: dts: imx952: " Peng Fan (OSS)
2026-11-05 3:53 ` [PATCH v3 11/11] arm64: dts: imx94: add clocks for gpio controller Peng Fan (OSS)
2026-11-10 11:30 ` (subset) [PATCH v3 00/11] gpio: vf610: fix clocks and misc cleanup Bartosz Golaszewski
2026-11-11 20:34 ` Frank.Li
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=20261105-gpio-vf610-fixes-v3-5-504e19de5ad5@nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=brgl@bgdev.pl \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=stefan@agner.ch \
/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
all inboxes | Powered by JetHome®