From: Andy Shevchenko <andy@kernel.org>
To: Huqiang Qin <huqiang.qin@amlogic.com>
Cc: linus.walleij@linaro.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
neil.armstrong@linaro.org, khilman@baylibre.com,
jbrunet@baylibre.com, martin.blumenstingl@googlemail.com,
brgl@bgdev.pl, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] pinctrl: Add driver support for Amlogic C3 SoCs
Date: Thu, 6 Jul 2023 15:29:52 +0300 [thread overview]
Message-ID: <ZKazwMpmsNzBuWA7@smile.fi.intel.com> (raw)
In-Reply-To: <20230706114522.2490655-3-huqiang.qin@amlogic.com>
On Thu, Jul 06, 2023 at 07:45:22PM +0800, Huqiang Qin wrote:
> Add new pinctrl driver for Amlogic C3 SoCs which share the
a new
> same register layout as the previous Amloigc S4
Missing period at the end.
...
> +config PINCTRL_AMLOGIC_C3
> + tristate "Amlogic C3 SoC pinctrl driver"
> + depends on ARM64
> + select PINCTRL_MESON_AXG_PMX
> + default y
This default seems a bad cargo cult. Why ARM64 kernel should have all them be
opt-out, instead of opt-in? Shouldn't this be a distro problem?
...
> + MESON_PIN(GPIO_TEST_N)
Is it real one?
> +};
...
> + /* Bank A func6 */
> + GROUP(spi_a_mosi_a, 6),
> + GROUP(gen_clk_a4, 6),
> + GROUP(clk12_24_a, 6)
Leave trailing comma here as it's not a terminator.
...
> +static const char * const i2c2_groups[] = {
> + "i2c2_sda", "i2c2_scl"
Ditto.
> +};
> +
> +static const char * const i2c3_groups[] = {
> + "i2c3_sda_c", "i2c3_scl_c",
> + "i2c3_sda_x", "i2c3_scl_x",
> + "i2c3_sda_d", "i2c3_scl_d"
Ditto.
> +};
...
> +#ifdef CONFIG_OF
Drop this ugly ifdeffery.
> +static const struct of_device_id c3_pinctrl_dt_match[] = {
> + {
> + .compatible = "amlogic,c3-periphs-pinctrl",
> + .data = &c3_periphs_pinctrl_data,
> + },
> + { },
No comma for the terminator.
> +};
> +MODULE_DEVICE_TABLE(of, c3_pinctrl_dt_match);
> +#endif /* CONFIG_OF */
> +
> +static struct platform_driver c3_pinctrl_driver = {
> + .probe = meson_pinctrl_probe,
> + .driver = {
> + .name = "amlogic-c3-pinctrl",
> + .of_match_table = of_match_ptr(c3_pinctrl_dt_match),
Drop the rather problematic of_match_ptr().
> + },
> +};
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-07-06 12:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 11:45 [PATCH 0/2] Add pinctrl driver support for Amlogic C3 SoCs Huqiang Qin
2023-07-06 11:45 ` [PATCH 1/2] dt-bindings: gpio: Add a header file " Huqiang Qin
2023-07-06 11:45 ` [PATCH 2/2] pinctrl: Add driver support " Huqiang Qin
2023-07-06 12:29 ` Andy Shevchenko [this message]
2023-07-07 4:07 ` Huqiang Qin
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=ZKazwMpmsNzBuWA7@smile.fi.intel.com \
--to=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=huqiang.qin@amlogic.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).