linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Griffin <peter.griffin@linaro.org>
To: Youngmin Nam <youngmin.nam@samsung.com>
Cc: krzk@kernel.org, s.nawrocki@samsung.com, alim.akhtar@samsung.com,
	 linus.walleij@linaro.org, semen.protsenko@linaro.org,
	ryu.real@samsung.com,  d7271.choe@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: [RFT PATCH v2 0/5] pinctrl: samsung: exynos9 cleanups and fixes
Date: Mon, 24 Nov 2025 17:42:22 +0000	[thread overview]
Message-ID: <CADrjBPrPpgy93At1bBanBoka14eyRbAArep5zuvbGWcOEnOuRQ@mail.gmail.com> (raw)
In-Reply-To: <20251117074140.4090939-1-youngmin.nam@samsung.com>

Hi Youngmin,

On Mon, 17 Nov 2025 at 07:36, Youngmin Nam <youngmin.nam@samsung.com> wrote:
>
> Several SoCs carried near-duplicate pin bank macro families, making
> tables verbose and hard to share when only the bank type (alive/off)
> differs.
>
> GS101 had its own helpers even though the newer EXYNOS9_* helpers cover
> the same semantics, including per-bank filter control (FLTCON) offsets.
>
> Some pin-bank tables didn't match the SoC TRMs (bank type, EINT class,
> or bank names), and FLTCON wasn't always at a contiguous offset from
> EINT.
>
> This series does
> - Consolidate on EXYNOS9_* pin-bank macros. Pass bank_type explicitly.
> - Fix table errors on Exynos2200/7885/8890/8895 per TRM.
> - Add explicit per-bank FLTCON offsets and update affected tables.
> - Drop GS101-specific macros in favor of EXYNOS9_*.
> - Rename gs101_pinctrl_{suspend,resume} ->
>   exynos9_pinctrl_{suspend,resume}.
>
> This series was based on the pinctrl/samsung tree [1].
>
> I tested on Exynos850 through boot and verified the pin values as
> follows:

One thing I just noticed is exynos850_pin_ctrl isn't actually setting
the .suspend and .resume callbacks so some of this code won't be
executed there (specifically saving/restoring the fltcon register). If
you're using e850 platform to test this series, you likely want to set

.suspend = exynos9_pinctrl_suspend,
.resume = exynos9_pinctrl_resume,

in exynos850_pin_ctrl for the alive bank

You can then #define DEBUG in drivers/pinctrl/samsung/pinctrl-exynos.c

Recompile, and do

echo platform > /sys/power/pm_test
echo mem > /sys/power/state

and you should see all the debug from the newly enabled exynos9
suspend/resume callbacks

[  871.104840][  T741] gph2: save     con 0x00000000
[  871.104932][  T741] gph2: save fltcon0 0x00000000
[  871.105022][  T741] gph2: save fltcon1 0x00000000
[  871.105109][  T741] gph2: save    mask 0x0000003f
<snip>

Prior to adding fltcon_offset and the gs101 (now exynos9) specific
suspend/resume callbacks this would generate a SError on gs101

Thanks,

Peter

>
> $:/sys/kernel/debug/pinctrl/139b0000.pinctrl-samsung-pinctrl# cat pins
> registered pins: 42
> pin 0 (gpg0-0) 0:gpg0 CON(0x0) DAT(0x0) PUD(0x1) DRV(0x2) CON_PDN(0x2) PUD_PDN(0x1)
> pin 1 (gpg0-1) 1:gpg0 CON(0x0) DAT(0x0) PUD(0x1) DRV(0x2) CON_PDN(0x2) PUD_PDN(0x1)
> ...
>
> Additional testing on the affected Exynos9-era platforms would be
> appreciated.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung.git
>
> Changes in v2:
>   - Added base tree for this series (pinctrl/samsung).
>   - Renamed the macro parameter from 'types' to 'bank_type' for clarity
>     (struct member remains 'type').
>   - Reflowed commit messages (wrap at ~72 cols).
>   - Replaced non-ASCII characters with ASCII equivalents.
>   - Collected tags:
>       Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
>       Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
>   - Normalized hex literals to lowercase and removed double spaces.
>   - Aligned backslashes in macro definitions to form a vertical column
>     for readability.
>   - Added missing mailing lists (including linux-kernel) to Cc per
>     scripts/get_maintainer.pl.
>
> Youngmin Nam (5):
>   pinctrl: samsung: Consolidate pin-bank macros under EXYNOS9_* and pass
>     bank_type explicitly
>   pinctrl: samsung: fix incorrect pin-bank entries on
>     Exynos2200/7885/8890/8895
>   pinctrl: samsung: add per-bank FLTCON offset to EXYNOS9_PIN_BANK_* and
>     fix tables
>   pinctrl: samsung: fold GS101 pin-bank macros into EXYNOS9_*
>   pinctrl: samsung: rename gs101_pinctrl_* to exynos9_pinctrl_*
>
>  .../pinctrl/samsung/pinctrl-exynos-arm64.c    | 1069 ++++++++---------
>  drivers/pinctrl/samsung/pinctrl-exynos.c      |    4 +-
>  drivers/pinctrl/samsung/pinctrl-exynos.h      |   97 +-
>  drivers/pinctrl/samsung/pinctrl-samsung.h     |    4 +-
>  4 files changed, 562 insertions(+), 612 deletions(-)
>
> --
> 2.39.2
>

  parent reply	other threads:[~2025-11-24 17:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20251117073601epcas2p2c72bdd8689a69b35b988894653300c75@epcas2p2.samsung.com>
2025-11-17  7:41 ` [RFT PATCH v2 0/5] pinctrl: samsung: exynos9 cleanups and fixes Youngmin Nam
     [not found]   ` <CGME20251117073602epcas2p42e4724000996129f1bdb6845efba0adc@epcas2p4.samsung.com>
2025-11-17  7:41     ` [RFT PATCH v2 1/5] pinctrl: samsung: Consolidate pin-bank macros under EXYNOS9_* and pass bank_type explicitly Youngmin Nam
     [not found]   ` <CGME20251117073603epcas2p1366028012403591bd297764f91694181@epcas2p1.samsung.com>
2025-11-17  7:41     ` [RFT PATCH v2 2/5] pinctrl: samsung: fix incorrect pin-bank entries on Exynos2200/7885/8890/8895 Youngmin Nam
2025-11-17 13:42       ` Ivaylo Ivanov
2025-11-18  0:46         ` Youngmin Nam
     [not found]   ` <CGME20251117073604epcas2p2d371a278d498107abd5913d2438c4863@epcas2p2.samsung.com>
2025-11-17  7:41     ` [RFT PATCH v2 3/5] pinctrl: samsung: add per-bank FLTCON offset to EXYNOS9_PIN_BANK_* and fix tables Youngmin Nam
     [not found]   ` <CGME20251117073604epcas2p3f35b42617fb26aa087409eb84c19724c@epcas2p3.samsung.com>
2025-11-17  7:41     ` [RFT PATCH v2 4/5] pinctrl: samsung: fold GS101 pin-bank macros into EXYNOS9_* Youngmin Nam
2025-11-24 17:22       ` Peter Griffin
     [not found]   ` <CGME20251117073605epcas2p19eac6ba9cf1d4fd2e866e5de6a843802@epcas2p1.samsung.com>
2025-11-17  7:41     ` [RFT PATCH v2 5/5] pinctrl: samsung: rename gs101_pinctrl_* to exynos9_pinctrl_* Youngmin Nam
2025-11-24 17:24       ` Peter Griffin
2025-11-24 17:42   ` Peter Griffin [this message]
2025-12-02  5:23     ` [RFT PATCH v2 0/5] pinctrl: samsung: exynos9 cleanups and fixes Youngmin Nam

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=CADrjBPrPpgy93At1bBanBoka14eyRbAArep5zuvbGWcOEnOuRQ@mail.gmail.com \
    --to=peter.griffin@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=d7271.choe@samsung.com \
    --cc=krzk@kernel.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-samsung-soc@vger.kernel.org \
    --cc=ryu.real@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=semen.protsenko@linaro.org \
    --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).