From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Patrick Rudolph <patrick.rudolph@9elements.com>,
Linus Walleij <linusw@kernel.org>
Subject: [PATCH v1 8/8] pinctrl: cy8c95x0: Gather ID tables in one place
Date: Mon, 23 Feb 2026 19:06:58 +0100 [thread overview]
Message-ID: <20260223180859.2845261-9-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20260223180859.2845261-1-andriy.shevchenko@linux.intel.com>
We have three ID tables spread over the driver code. Move all of them
closer to the end of the file where the first user appears to be. With
that done, drop unneeded trailing commas.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/pinctrl-cy8c95x0.c | 38 +++++++++++++++---------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c
index 1d3e0617b235..0d295ebc33d1 100644
--- a/drivers/pinctrl/pinctrl-cy8c95x0.c
+++ b/drivers/pinctrl/pinctrl-cy8c95x0.c
@@ -72,24 +72,6 @@
#define CY8C95X0_MUX_REGMAP_TO_OFFSET(x, p) \
(CY8C95X0_VIRTUAL + (x) - CY8C95X0_PORTSEL + (p) * MUXED_STRIDE)
-static const struct i2c_device_id cy8c95x0_id[] = {
- { "cy8c9520", 20, },
- { "cy8c9540", 40, },
- { "cy8c9560", 60, },
- { }
-};
-MODULE_DEVICE_TABLE(i2c, cy8c95x0_id);
-
-#define OF_CY8C95X(__nrgpio) ((void *)(__nrgpio))
-
-static const struct of_device_id cy8c95x0_dt_ids[] = {
- { .compatible = "cypress,cy8c9520", .data = OF_CY8C95X(20), },
- { .compatible = "cypress,cy8c9540", .data = OF_CY8C95X(40), },
- { .compatible = "cypress,cy8c9560", .data = OF_CY8C95X(60), },
- { }
-};
-MODULE_DEVICE_TABLE(of, cy8c95x0_dt_ids);
-
static const struct acpi_gpio_params cy8c95x0_irq_gpios = { 0, 0, true };
static const struct acpi_gpio_mapping cy8c95x0_acpi_irq_gpios[] = {
@@ -1478,8 +1460,26 @@ static int cy8c95x0_probe(struct i2c_client *client)
return cy8c95x0_setup_gpiochip(chip);
}
+static const struct i2c_device_id cy8c95x0_id[] = {
+ { "cy8c9520", 20 },
+ { "cy8c9540", 40 },
+ { "cy8c9560", 60 },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, cy8c95x0_id);
+
+#define OF_CY8C95X(__nrgpio) ((void *)(__nrgpio))
+
+static const struct of_device_id cy8c95x0_dt_ids[] = {
+ { .compatible = "cypress,cy8c9520", .data = OF_CY8C95X(20) },
+ { .compatible = "cypress,cy8c9540", .data = OF_CY8C95X(40) },
+ { .compatible = "cypress,cy8c9560", .data = OF_CY8C95X(60) },
+ { }
+};
+MODULE_DEVICE_TABLE(of, cy8c95x0_dt_ids);
+
static const struct acpi_device_id cy8c95x0_acpi_ids[] = {
- { "INT3490", 40, },
+ { "INT3490", 40 },
{ }
};
MODULE_DEVICE_TABLE(acpi, cy8c95x0_acpi_ids);
--
2.50.1
next prev parent reply other threads:[~2026-02-23 18:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 18:06 [PATCH v1 0/8] pinctrl: cy8c95x0: Yet another cleanup series and a fix Andy Shevchenko
2026-02-23 18:06 ` [PATCH v1 1/8] pinctrl: cy8c95x0: Don't miss reading the last bank registers Andy Shevchenko
2026-02-23 18:06 ` [PATCH v1 2/8] pinctrl: cy8c95x0: Use devm_mutex_init() for mutex initialization Andy Shevchenko
2026-02-23 18:06 ` [PATCH v1 3/8] pinctrl: cy8c95x0: remove duplicate error message Andy Shevchenko
2026-02-23 18:06 ` [PATCH v1 4/8] pinctrl: cy8c95x0: Unify messages with help of dev_err_probe() Andy Shevchenko
2026-02-23 18:06 ` [PATCH v1 5/8] pinctrl: cy8c95x0: Move driver data to the local variable in ->probe() Andy Shevchenko
2026-02-23 18:06 ` [PATCH v1 6/8] pinctrl: cy8c95x0: Drop unused 'name' in struct cy8c95x0_pinctrl Andy Shevchenko
2026-02-23 18:06 ` [PATCH v1 7/8] pinctrl: cy8c95x0: Eliminate fragile use of I²C ID table Andy Shevchenko
2026-02-23 18:06 ` Andy Shevchenko [this message]
2026-02-26 22:43 ` [PATCH v1 0/8] pinctrl: cy8c95x0: Yet another cleanup series and a fix Linus Walleij
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=20260223180859.2845261-9-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrick.rudolph@9elements.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