Re: [PATCH 14/20] pinctrl: berlin: support Synaptics SL261X SoCs

From: Uwe Kleine-König

Date: Tue Sep 29 2026 - 11:35:06 EST


Hello,

On Tue, Sep 29, 2026 at 02:14:11PM +0800, Jisheng Zhang wrote:
> +#include <linux/mod_devicetable.h>

Please rely on <linux/platform_device.h> to pull in the definition of
of_device_id and drop the inclusion of <linux/mod_devicetable.h>.

Including <linux/mod_devicetable.h> creates a bunch of unneeded
dependencies on subsystems you will never need in this driver.

> [...]
> +static const struct of_device_id sl261x_pinctrl_match[] = {
> + {
> + .compatible = "syna,sl261x-soc-pinctrl",
> + .data = &sl261x_soc_pinctrl_data,
> + },
> + {
> + .compatible = "syna,sl261x-system-pinctrl",
> + .data = &sl261x_sysmgr_pinctrl_data,
> + },
> + {}

Please use { } (with a space) to match the most common style for these
arrays.

> +};
> +MODULE_DEVICE_TABLE(of, sl261x_pinctrl_match);
> +
> +static int sl261x_pinctrl_probe(struct platform_device *pdev)
> +{
> + return berlin_pinctrl_probe(pdev, device_get_match_data(&pdev->dev));
> +}
> +
> +static struct platform_driver sl261x_pinctrl_driver = {
> + .probe = sl261x_pinctrl_probe,

Not a fan on aligning the =, still more if it's done inconsistently in a
single struct. If you ask me, just use a single space before the =.

> + .driver = {
> + .name = "sl261x-pinctrl",
> + .of_match_table = sl261x_pinctrl_match,
> + },
> +};
> +module_platform_driver(sl261x_pinctrl_driver);

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature