Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: Hui Liu <hui.liu@mediatek.com>
Cc: linus.walleij@linaro.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com,
	Project_Global_Chrome_Upstream_Group@mediatek.com,
	jianguo.zhang@mediatek.com, zhiyong.tao@mediatek.com,
	sean.wang@mediatek.com, linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] pinctrl: mediatek: add mt8188 driver
Date: Wed, 17 Aug 2022 15:55:00 -0400	[thread overview]
Message-ID: <20220817195500.d6roam5gyghburjs@notapiano> (raw)
In-Reply-To: <20220801095215.10876-3-hui.liu@mediatek.com>

Hi Hui,

On Mon, Aug 01, 2022 at 05:52:15PM +0800, Hui Liu wrote:
> From: "Hui.Liu" <hui.liu@mediatek.com>
> 
> Add pinctrl driver support for MediaTek SoC mt8188.
> 
> Signed-off-by: Hui.Liu <hui.liu@mediatek.com>
> ---
[..]
> --- /dev/null
> +++ b/drivers/pinctrl/mediatek/pinctrl-mt8188.c
[..]
> +static const struct mtk_pin_field_calc mt8188_pin_mode_range[] = {
> +	PIN_FIELD(0, 177, 0x0300, 0x10, 0, 4),
> +};

Missing blank line after declaration.

> +static const struct mtk_pin_field_calc mt8188_pin_dir_range[] = {
> +	PIN_FIELD(0, 177, 0x0000, 0x10, 0, 1),
> +};

Ditto.

> +static const struct mtk_pin_field_calc mt8188_pin_di_range[] = {
> +	PIN_FIELD(0, 177, 0x0200, 0x10, 0, 1),
> +};

Ditto.

> +static const struct mtk_pin_field_calc mt8188_pin_do_range[] = {
> +	PIN_FIELD(0, 177, 0x0100, 0x10, 0, 1),
> +};

Ditto.

> +static const struct mtk_pin_field_calc mt8188_pin_smt_range[] = {
[..]
> +static const struct mtk_pin_reg_calc mt8188_reg_cals[PINCTRL_PIN_REG_MAX] = {
> +	[PINCTRL_PIN_REG_MODE]	= MTK_RANGE(mt8188_pin_mode_range),
> +	[PINCTRL_PIN_REG_DIR]	= MTK_RANGE(mt8188_pin_dir_range),
> +	[PINCTRL_PIN_REG_DI]	= MTK_RANGE(mt8188_pin_di_range),
> +	[PINCTRL_PIN_REG_DO]	= MTK_RANGE(mt8188_pin_do_range),
> +	[PINCTRL_PIN_REG_SMT]	= MTK_RANGE(mt8188_pin_smt_range),
> +	[PINCTRL_PIN_REG_IES]	= MTK_RANGE(mt8188_pin_ies_range),
> +	[PINCTRL_PIN_REG_TDSEL]	= MTK_RANGE(mt8188_pin_tdsel_range),
> +	[PINCTRL_PIN_REG_RDSEL]	= MTK_RANGE(mt8188_pin_rdsel_range),
> +	[PINCTRL_PIN_REG_PUPD]	= MTK_RANGE(mt8188_pin_pupd_range),
> +	[PINCTRL_PIN_REG_R0]	= MTK_RANGE(mt8188_pin_r0_range),
> +	[PINCTRL_PIN_REG_R1]	= MTK_RANGE(mt8188_pin_r1_range),
> +	[PINCTRL_PIN_REG_PU]	= MTK_RANGE(mt8188_pin_pu_range),
> +	[PINCTRL_PIN_REG_PD]	= MTK_RANGE(mt8188_pin_pd_range),
> +	[PINCTRL_PIN_REG_DRV]	= MTK_RANGE(mt8188_pin_drv_range),
> +	[PINCTRL_PIN_REG_DRV_ADV]	= MTK_RANGE(mt8188_pin_drv_adv_range),
> +	[PINCTRL_PIN_REG_RSEL]	= MTK_RANGE(mt8188_pin_rsel_range),

Please use just space around the = instead of tabs. Like is done on mt8183,
mt8186, mt8192 and mt8195.

> +};
[..]
> +static const struct mtk_pin_soc mt8188_data = {
> +	.reg_cal	= mt8188_reg_cals,
> +	.pins	= mtk_pins_mt8188,
> +	.npins	= ARRAY_SIZE(mtk_pins_mt8188),
> +	.ngrps	= ARRAY_SIZE(mtk_pins_mt8188),
> +	.eint_hw	= &mt8188_eint_hw,
> +	.nfuncs	= 8,
> +	.gpio_m	= 0,
> +	.base_names	= mt8188_pinctrl_register_base_name,
> +	.nbase_names	= ARRAY_SIZE(mt8188_pinctrl_register_base_name),
> +	.bias_set_combo	= mtk_pinconf_bias_set_combo,
> +	.pull_type = mt8188_pull_type,
> +	.pin_rsel = mt8188_pin_rsel_val_range,
> +	.npin_rsel = ARRAY_SIZE(mt8188_pin_rsel_val_range),
> +	.bias_get_combo	= mtk_pinconf_bias_get_combo,

Keep this one together with bias_set_combo.

> +	.drive_set	= mtk_pinconf_drive_set_rev1,
> +	.drive_get	= mtk_pinconf_drive_get_rev1,
> +	.adv_drive_set	= mtk_pinconf_adv_drive_set_raw,
> +	.adv_drive_get	= mtk_pinconf_adv_drive_get_raw,

And also use spaces instead of tabs for all entries here.

With those changes,

Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Thanks,
Nícolas

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-08-17 19:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01  9:52 [PATCH v5 0/2] MediaTek pinctrl patch on mt8188 Hui Liu
2022-08-01  9:52 ` [PATCH v5 1/2] dt-bindings: pinctrl: mediatek: add support for mt8188 Hui Liu
2022-08-03 22:35   ` Rob Herring
     [not found] ` <20220801095215.10876-3-hui.liu@mediatek.com>
2022-08-17 19:55   ` Nícolas F. R. A. Prado [this message]
2022-08-18  2:49     ` [PATCH v5 2/2] pinctrl: mediatek: add mt8188 driver hui.liu

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=20220817195500.d6roam5gyghburjs@notapiano \
    --to=nfraprado@collabora.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hui.liu@mediatek.com \
    --cc=jianguo.zhang@mediatek.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=zhiyong.tao@mediatek.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