From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: linux-gpio@vger.kernel.org
Cc: linusw@kernel.org, brgl@kernel.org, vicencb@gmail.com,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/4] gpio: mt7621: unify naming style in driver code
Date: Fri, 26 Jun 2026 08:01:12 +0200 [thread overview]
Message-ID: <20260626060112.2498324-5-sergio.paracuellos@gmail.com> (raw)
In-Reply-To: <20260626060112.2498324-1-sergio.paracuellos@gmail.com>
There is a mix of 'mediatek' and 'mt7621' mix of prefix in different
function names along the code of the driver. Be consistent using 'mt7621'
for all function prefixes.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
drivers/gpio/gpio-mt7621.c | 40 +++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index 1b0b5247d3c9..87086c322f08 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -68,7 +68,7 @@ mt7621_gpio_gc_to_priv(struct gpio_chip *gc)
}
static inline struct mtk_gc *
-to_mediatek_gpio(struct gpio_chip *chip)
+to_mt7621_gpio(struct gpio_chip *chip)
{
struct gpio_generic_chip *gen_gc = to_gpio_generic_chip(chip);
@@ -137,7 +137,7 @@ mt7621_gpio_hwirq_to_offset(irq_hw_number_t hwirq, struct mtk_gc *bank)
}
static void
-mediatek_gpio_irq_unmask(struct irq_data *d)
+mt7621_gpio_irq_unmask(struct irq_data *d)
{
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct mtk_gc *rg = gpiochip_get_data(gc);
@@ -159,7 +159,7 @@ mediatek_gpio_irq_unmask(struct irq_data *d)
}
static void
-mediatek_gpio_irq_mask(struct irq_data *d)
+mt7621_gpio_irq_mask(struct irq_data *d)
{
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct mtk_gc *rg = gpiochip_get_data(gc);
@@ -181,7 +181,7 @@ mediatek_gpio_irq_mask(struct irq_data *d)
}
static int
-mediatek_gpio_irq_type(struct irq_data *d, unsigned int type)
+mt7621_gpio_irq_type(struct irq_data *d, unsigned int type)
{
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct mtk_gc *rg = gpiochip_get_data(gc);
@@ -245,11 +245,11 @@ mt7621_gpio_irq_relres(struct irq_data *d)
}
static int
-mediatek_gpio_xlate(struct gpio_chip *chip,
+mt7621_gpio_xlate(struct gpio_chip *chip,
const struct of_phandle_args *spec, u32 *flags)
{
int gpio = spec->args[0];
- struct mtk_gc *rg = to_mediatek_gpio(chip);
+ struct mtk_gc *rg = to_mt7621_gpio(chip);
if (rg->bank != gpio / MTK_BANK_WIDTH)
return -EINVAL;
@@ -264,10 +264,10 @@ static const struct irq_chip mt7621_irq_chip = {
.name = "mt7621-gpio",
.irq_request_resources = mt7621_gpio_irq_reqres,
.irq_release_resources = mt7621_gpio_irq_relres,
- .irq_mask_ack = mediatek_gpio_irq_mask,
- .irq_mask = mediatek_gpio_irq_mask,
- .irq_unmask = mediatek_gpio_irq_unmask,
- .irq_set_type = mediatek_gpio_irq_type,
+ .irq_mask_ack = mt7621_gpio_irq_mask,
+ .irq_mask = mt7621_gpio_irq_mask,
+ .irq_unmask = mt7621_gpio_irq_unmask,
+ .irq_set_type = mt7621_gpio_irq_type,
.flags = IRQCHIP_IMMUTABLE,
};
@@ -380,7 +380,7 @@ mt7621_gpio_to_irq(struct gpio_chip *gc, unsigned int offset)
}
static int
-mediatek_gpio_bank_probe(struct device *dev, int bank)
+mt7621_gpio_bank_probe(struct device *dev, int bank)
{
struct gpio_generic_chip_config config;
struct mtk *mtk = dev_get_drvdata(dev);
@@ -416,7 +416,7 @@ mediatek_gpio_bank_probe(struct device *dev, int bank)
}
rg->chip.gc.of_gpio_n_cells = 2;
- rg->chip.gc.of_xlate = mediatek_gpio_xlate;
+ rg->chip.gc.of_xlate = mt7621_gpio_xlate;
rg->chip.gc.ngpio = MTK_BANK_WIDTH;
rg->chip.gc.label = devm_kasprintf(dev, GFP_KERNEL, "%s-bank%d",
dev_name(dev), bank);
@@ -443,7 +443,7 @@ mediatek_gpio_bank_probe(struct device *dev, int bank)
}
static int
-mediatek_gpio_probe(struct platform_device *pdev)
+mt7621_gpio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct mtk *mtk;
@@ -477,7 +477,7 @@ mediatek_gpio_probe(struct platform_device *pdev)
return ret;
for (i = 0; i < MTK_BANK_CNT; i++) {
- ret = mediatek_gpio_bank_probe(dev, i);
+ ret = mt7621_gpio_bank_probe(dev, i);
if (ret)
return ret;
}
@@ -485,18 +485,18 @@ mediatek_gpio_probe(struct platform_device *pdev)
return 0;
}
-static const struct of_device_id mediatek_gpio_match[] = {
+static const struct of_device_id mt7621_gpio_match[] = {
{ .compatible = "mediatek,mt7621-gpio" },
{},
};
-MODULE_DEVICE_TABLE(of, mediatek_gpio_match);
+MODULE_DEVICE_TABLE(of, mt7621_gpio_match);
-static struct platform_driver mediatek_gpio_driver = {
- .probe = mediatek_gpio_probe,
+static struct platform_driver mt7621_gpio_driver = {
+ .probe = mt7621_gpio_probe,
.driver = {
.name = "mt7621_gpio",
- .of_match_table = mediatek_gpio_match,
+ .of_match_table = mt7621_gpio_match,
},
};
-builtin_platform_driver(mediatek_gpio_driver);
+builtin_platform_driver(mt7621_gpio_driver);
--
2.43.0
next prev parent reply other threads:[~2026-06-26 6:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 6:01 [PATCH v2 0/4] gpio: mt7621: address Sashiko complains and other cleanups Sergio Paracuellos
2026-06-26 6:01 ` [PATCH v2 1/4] gpio: mt7621: avoid corruption of shared interrupt trigger state Sergio Paracuellos
2026-06-26 6:01 ` [PATCH v2 2/4] gpio: mt7621: more robust management of IRQ domain teardown Sergio Paracuellos
2026-06-26 6:01 ` [PATCH v2 3/4] gpio: mt7621: be sure IRQ domain is created before exposing GPIO chips Sergio Paracuellos
2026-06-30 14:06 ` Bartosz Golaszewski
2026-06-30 14:12 ` Sergio Paracuellos
2026-06-26 6:01 ` Sergio Paracuellos [this message]
2026-06-30 14:37 ` (subset) [PATCH v2 0/4] gpio: mt7621: address Sashiko complains and other cleanups Bartosz Golaszewski
2026-06-30 17:33 ` Sergio Paracuellos
2026-07-01 7:04 ` Bartosz Golaszewski
2026-07-01 7:13 ` Sergio Paracuellos
2026-07-06 8:47 ` Bartosz Golaszewski
2026-07-06 12:22 ` Sergio Paracuellos
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=20260626060112.2498324-5-sergio.paracuellos@gmail.com \
--to=sergio.paracuellos@gmail.com \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vicencb@gmail.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