linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Youngmin Nam <youngmin.nam@samsung.com>,
	s.nawrocki@samsung.com, alim.akhtar@samsung.com,
	linus.walleij@linaro.org, peter.griffin@linaro.org,
	semen.protsenko@linaro.org, ivo.ivanov.ivanov1@gmail.com
Cc: ryu.real@samsung.com, d7271.choe@samsung.com,
	shin.son@samsung.com, jaewon02.kim@samsung.com,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/5] pinctrl: samsung: Consolidate pin-bank macros under EXYNOS9_* and pass bank_type explicitly
Date: Sun, 28 Dec 2025 12:40:36 +0100	[thread overview]
Message-ID: <8b97f7a0-5d43-41ed-85a7-e48488c49264@kernel.org> (raw)
In-Reply-To: <20251202093613.852109-2-youngmin.nam@samsung.com>

On 02/12/2025 10:36, Youngmin Nam wrote:
> Modern Exynos platforms have several near-duplicate pin-bank macro
> families (EXYNOS850_*, EXYNOS8895_*, EXYNOS7870_*), which makes
> tables verbose and harder to share across SoCs that differ only by
> bank_type (alive/off) layout.

I do not see at all how you reduced duplication, reduced verbosity or
made here anything easier to read.

Previous explicit EXYNOS850_PIN_BANK_EINTW() - so having one information
about SoC - is now containing more verbose two informations:

EXYNOS9_PIN_BANK_EINTW + exynos9_bank_type_alive,


> 
> This patch unifies them into one EXYNOS9_* macro family and makes the
> bank_type an explicit argument. The common 850-era bank types are also
> renamed to 'exynos9_bank_type_{alive,off}' to reflect their reuse on
> later Exynos 9xxx-generation parts.
> 
> Naming rationale:
> - Use of the EXYNOS9_* prefix indicates that these macros target
>   current Exynos generations sharing the same register layout and
>   EINT wiring model. Compared to SoC-specific prefixes

There is no exynos9 chip. There is also no need to rename Exynos850 to
Exynos9, because old name is correct, accurate and probably even older,
thus more suitable choice.


>   (EXYNOS850_*, EXYNOS8895_*),
>   EXYNOS9_* is clearer and more future-proof for modern parts.
> 
> Key changes:
> - Introduce:
>   - 'EXYNOS9_PIN_BANK_EINTN(bank_type, pins, reg, id)'
>   - 'EXYNOS9_PIN_BANK_EINTG(bank_type, pins, reg, id, offs)'
>   - 'EXYNOS9_PIN_BANK_EINTW(bank_type, pins, reg, id, offs)'
> - Rename:
>   - 'exynos850_bank_type_alive'-> 'exynos9_bank_type_alive'
>   - 'exynos850_bank_type_off'  -> 'exynos9_bank_type_off'
> - Convert pin-bank tables for:
>   - Exynos2200, 7870, 7885, 850, 990, 9810, 8890, 8895,
>     AutoV9, AutoV920, FSD
> - Update GS101/EXYNOSV920 helpers to reference 'exynos9_bank_type_*'
>   instead of the old exynos850 names.
> - Standardize on EXYNOS9_* macros while keeping SoC-specific
>   '*_bank_type_*' when layouts differ (e.g., 7870/8895).
> 
> No functional change intended.
> 
> Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
> Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
>  .../pinctrl/samsung/pinctrl-exynos-arm64.c    | 785 +++++++++---------
>  drivers/pinctrl/samsung/pinctrl-exynos.h      |  49 +-
>  2 files changed, 402 insertions(+), 432 deletions(-)
> 
> diff --git a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
> index 627dca504d7a..d11b2d4ca913 100644
> --- a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
> +++ b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
> @@ -53,7 +53,7 @@ static const struct samsung_pin_bank_type exynos7870_bank_type_alive = {
>   * Bank type for non-alive type. Bit fields:
>   * CON: 4, DAT: 1, PUD: 4, DRV: 4, CONPDN: 2, PUDPDN: 4
>   */
> -static const struct samsung_pin_bank_type exynos850_bank_type_off  = {
> +static const struct samsung_pin_bank_type exynos9_bank_type_off = {

This is completely pointless.

>  	.fld_width = { 4, 1, 4, 4, 2, 4, },
>  	.reg_offset = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, },
>  };
> @@ -62,7 +62,7 @@ static const struct samsung_pin_bank_type exynos850_bank_type_off  = {
>   * Bank type for alive type. Bit fields:
>   * CON: 4, DAT: 1, PUD: 4, DRV: 4
>   */
> -static const struct samsung_pin_bank_type exynos850_bank_type_alive = {
> +static const struct samsung_pin_bank_type exynos9_bank_type_alive = {
>  	.fld_width = { 4, 1, 4, 4, },
>  	.reg_offset = { 0x00, 0x04, 0x08, 0x0c, },
>  };
> @@ -90,11 +90,11 @@ static atomic_t exynos_shared_retention_refcnt;
>  
>  /* pin banks of exynos2200 pin-controller - ALIVE */
>  static const struct samsung_pin_bank_data exynos2200_pin_banks0[] __initconst = {
> -	EXYNOS850_PIN_BANK_EINTW(8, 0x0, "gpa0", 0x00),
> -	EXYNOS850_PIN_BANK_EINTW(8, 0x20, "gpa1", 0x04),
> -	EXYNOS850_PIN_BANK_EINTW(8, 0x40, "gpa2", 0x08),
> -	EXYNOS850_PIN_BANK_EINTW(8, 0x60, "gpa3", 0x0c),
> -	EXYNOS850_PIN_BANK_EINTW(2, 0x80, "gpa4", 0x10),
> +	EXYNOS9_PIN_BANK_EINTW(exynos9_bank_type_alive, 8, 0x0, "gpa0", 0x00),

And this is less readable.

Best regards,
Krzysztof


  parent reply	other threads:[~2025-12-28 11:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20251202093024epcas2p1567dddf09e3599867e9dc14a9a234d38@epcas2p1.samsung.com>
2025-12-02  9:36 ` [PATCH v3 0/5] pinctrl: samsung: exynos9 cleanups and fixes Youngmin Nam
2025-12-02  9:36   ` [PATCH v3 1/5] pinctrl: samsung: Consolidate pin-bank macros under EXYNOS9_* and pass bank_type explicitly Youngmin Nam
2025-12-17  4:28     ` Alim Akhtar
2025-12-28 11:40     ` Krzysztof Kozlowski [this message]
2025-12-02  9:36   ` [PATCH v3 2/5] pinctrl: samsung: fix incorrect pin-bank entries on Exynos2200/7885/8890/8895 Youngmin Nam
2025-12-17  4:33     ` Alim Akhtar
2025-12-28 11:37     ` Krzysztof Kozlowski
2025-12-02  9:36   ` [PATCH v3 3/5] pinctrl: samsung: add per-bank FLTCON offset to EXYNOS9_PIN_BANK_* and fix tables Youngmin Nam
2025-12-17  4:46     ` Alim Akhtar
2025-12-28 11:41     ` Krzysztof Kozlowski
2025-12-02  9:36   ` [PATCH v3 4/5] pinctrl: samsung: fold GS101 pin-bank macros into EXYNOS9_* Youngmin Nam
2025-12-17  4:43     ` Alim Akhtar
2025-12-02  9:36   ` [PATCH v3 5/5] pinctrl: samsung: rename gs101_pinctrl_* to exynos9_pinctrl_* Youngmin Nam
2025-12-17  4:53     ` Alim Akhtar
2025-12-28 11:43     ` Krzysztof Kozlowski

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=8b97f7a0-5d43-41ed-85a7-e48488c49264@kernel.org \
    --to=krzk@kernel.org \
    --cc=alim.akhtar@samsung.com \
    --cc=d7271.choe@samsung.com \
    --cc=ivo.ivanov.ivanov1@gmail.com \
    --cc=jaewon02.kim@samsung.com \
    --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-samsung-soc@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=ryu.real@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=semen.protsenko@linaro.org \
    --cc=shin.son@samsung.com \
    --cc=youngmin.nam@samsung.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;
as well as URLs for NNTP newsgroup(s).