linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
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, andy@kernel.org, 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 V2 2/2] pinctrl: Add driver support for Amlogic C3 SoCs
Date: Mon, 10 Jul 2023 10:33:46 +0300	[thread overview]
Message-ID: <CAHp75VevmTiv-OYVTn3bF_8UT9SKNU2oTrzS-AM1zoWefeJ=3w@mail.gmail.com> (raw)
In-Reply-To: <20230710042812.2007928-3-huqiang.qin@amlogic.com>

On Mon, Jul 10, 2023 at 7:28 AM Huqiang Qin <huqiang.qin@amlogic.com> wrote:
>
> Add a new pinctrl driver for Amlogic C3 SoCs which share
> the same register layout as the previous Amloigc S4.

...

> +#include <dt-bindings/gpio/amlogic-c3-gpio.h>

Seems some headers are missing. The rule of thumb is to include
headers the code uses directly.
Moreover, using a "proxy" header is not the best idea.

kernel.h // ARRAY_SIZE()
mod_devicetable.h // of_device_id
module.h
platform_device.h

pinctrl/pinctrl.h

> +#include "pinctrl-meson.h"
> +#include "pinctrl-meson-axg-pmx.h"

With the above, it might be that existing inclusions become unused, so
drop them in such a case.

...

> +static struct meson_pmx_func c3_periphs_functions[] = {
> +       FUNCTION(gpio_periphs),
> +       FUNCTION(uart_a),
> +       FUNCTION(uart_b),
> +       FUNCTION(uart_c),
> +       FUNCTION(uart_d),
> +       FUNCTION(uart_e),
> +       FUNCTION(i2c0),
> +       FUNCTION(i2c1),
> +       FUNCTION(i2c2),
> +       FUNCTION(i2c3),
> +       FUNCTION(i2c_slave),
> +       FUNCTION(pwm_a),
> +       FUNCTION(pwm_b),
> +       FUNCTION(pwm_c),
> +       FUNCTION(pwm_d),
> +       FUNCTION(pwm_e),
> +       FUNCTION(pwm_f),
> +       FUNCTION(pwm_g),
> +       FUNCTION(pwm_h),
> +       FUNCTION(pwm_i),
> +       FUNCTION(pwm_j),
> +       FUNCTION(pwm_k),
> +       FUNCTION(pwm_l),
> +       FUNCTION(pwm_m),
> +       FUNCTION(pwm_n),
> +       FUNCTION(pwm_c_hiz),
> +       FUNCTION(ir_out),
> +       FUNCTION(ir_in),
> +       FUNCTION(jtag_a),
> +       FUNCTION(jtag_b),
> +       FUNCTION(gen_clk),
> +       FUNCTION(clk12_24),
> +       FUNCTION(clk_32k_in),
> +       FUNCTION(emmc),
> +       FUNCTION(nand),
> +       FUNCTION(spif),
> +       FUNCTION(spi_a),
> +       FUNCTION(spi_b),
> +       FUNCTION(sdcard),
> +       FUNCTION(sdio),
> +       FUNCTION(pdm),
> +       FUNCTION(eth),
> +       FUNCTION(mclk_0),
> +       FUNCTION(mclk_1),
> +       FUNCTION(tdm),
> +       FUNCTION(lcd)

+ trailing comma. The rule of thumb is to add a comma when it's not a
terminator entry.

> +};

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2023-07-10  7:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  4:28 [PATCH V2 0/2] Add pinctrl driver support for Amlogic C3 SoCs Huqiang Qin
2023-07-10  4:28 ` [PATCH V2 1/2] dt-bindings: gpio: Add a header file " Huqiang Qin
2023-07-10  9:04   ` Bartosz Golaszewski
2023-07-10 16:38   ` Conor Dooley
2023-07-11  2:55     ` Huqiang Qin
2023-07-11 18:05       ` Conor Dooley
2023-07-12  5:56         ` Krzysztof Kozlowski
2023-07-14  8:43           ` Kelvin Zhang
2023-07-10  4:28 ` [PATCH V2 2/2] pinctrl: Add driver support " Huqiang Qin
2023-07-10  7:33   ` Andy Shevchenko [this message]
2023-07-10  9:32     ` Huqiang Qin
2023-07-10  7:26 ` [PATCH V2 0/2] Add pinctrl " Andy Shevchenko
2023-07-10  8:03   ` 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='CAHp75VevmTiv-OYVTn3bF_8UT9SKNU2oTrzS-AM1zoWefeJ=3w@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=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).