From: Paul Cercueil <paul@crapouillou.net>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Linus Walleij <linusw@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
letux-kernel@openphoenux.org
Subject: Re: [PATCH v5 6/7] pinctrl: ingenic: Handle X2600 Port E Schmitt trigger
Date: Wed, 25 Nov 2026 15:56:39 +0100 [thread overview]
Message-ID: <1a6496e133cdc2477931cbc2f95f3c647093b040.camel@crapouillou.net> (raw)
In-Reply-To: <D50BEB61-6E7B-40A8-BF1C-E69F7A49E644@goldelico.com>
Le mercredi 25 novembre 2026 à 15:51 +0100, H. Nikolaus Schaller a écrit :
> Hi Paul,
>
> > Am 25.11.2026 um 15:34 schrieb Paul Cercueil <paul@crapouillou.net>:
> >
> > Le mercredi 25 novembre 2026 à 07:49 +0100, H. Nikolaus Schaller a écrit :
> > > Port E has two Schmitt trigger configuration bits per pin.
> > > Select the lower-hysteresis mode when enabling and read both bits
> > > to report firmware-initialized settings.
> > >
> > > Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> >
> > Reviewed-by: Paul Cercueil <paul@crapouillou.net>
> >
> > With one question below.
> >
> > > ---
> > >
> > > Notes:
> > > Changes V5:
> > > - Keep the ingenic_get_pin_config() call and the Port E
> > > condition on single lines, as suggested by Paul Cercueil.
> > >
> > > drivers/pinctrl/pinctrl-ingenic.c | 7 +++++++
> > > 1 file changed, 7 insertions(+)
> > >
> > > diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-
> > > ingenic.c
> > > index 88531d472cd2e..d253674accacd 100644
> > > --- a/drivers/pinctrl/pinctrl-ingenic.c
> > > +++ b/drivers/pinctrl/pinctrl-ingenic.c
> > > @@ -69,6 +69,7 @@
> > > #define X2000_GPIO_PEPD 0x90
> > > #define X2000_GPIO_SR 0xd0
> > > #define X2000_GPIO_SMT 0xe0
> > > +#define X2600_GPIO_SMT1 0x100
> > >
> > > #define X2600_GPIO_SHADOW_OFFSET 0x800
> > > #define X2600_GPIO_PAGLD (X2600_GPIO_SHADOW_OFFSET +
> > > 0xf0)
> > > @@ -4693,6 +4694,8 @@ static int ingenic_pinconf_get(struct pinctrl_dev
> > > *pctldev,
> > > return -EINVAL;
> > >
> > > arg = !!ingenic_get_pin_config(jzpc, pin, reg);
> > > + if (is_soc(jzpc, ID_X2600) && offt == 4)
> > > + arg |= !!ingenic_get_pin_config(jzpc, pin,
> > > X2600_GPIO_SMT1);
> > > break;
> > >
> > > case PIN_CONFIG_SLEW_RATE:
> > > @@ -4767,6 +4770,10 @@ static void ingenic_set_bias(struct ingenic_pinctrl
> > > *jzpc,
> > > static void ingenic_set_schmitt_trigger(struct ingenic_pinctrl *jzpc,
> > > unsigned int pin, bool enable)
> > > {
> > > + /* Port E uses two bits; select the lower-hysteresis Schmitt mode. */
> > > + if (is_soc(jzpc, ID_X2600) && pin / PINS_PER_GPIO_CHIP == 4)
> > > + ingenic_config_pin(jzpc, pin, X2600_GPIO_SMT1, false);
> >
> > So on port E it will configure both X2600_GPIO_SMT1 and X2000_GPIO_SMT?
>
> Yes because the X2600 just adds one additional register SMT1 and I think
> it is not necessary to introduce a separate name and code for X2600_GPIO_SMT.
> And naming it X2000_GPIO_SMT1 would be wrong. So it is a compromise.
The register name is fine. I just wanted to make sure that it was correct that
ingenic_config_pin() is called twice.
-Paul
next prev parent reply other threads:[~2026-11-25 14:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 6:49 [PATCH v5 0/7] pinctrl: ingenic: Add X2600 support H. Nikolaus Schaller
2026-11-25 6:49 ` [PATCH v5 1/7] pinctrl: ingenic: Swap ID_X1600 and ID_X1830 H. Nikolaus Schaller
2026-11-25 6:49 ` [PATCH v5 2/7] pinctrl: ingenic: Fix hardware dual-edge interrupts on X1600 H. Nikolaus Schaller
2026-11-25 6:49 ` [PATCH v5 3/7] dt-bindings: pinctrl: ingenic: Add X2600 support H. Nikolaus Schaller
2026-11-25 6:49 ` [PATCH v5 4/7] pinctrl: ingenic: Add X2600 register and GPIO IRQ support H. Nikolaus Schaller
2026-11-25 14:31 ` Paul Cercueil
2026-11-25 6:49 ` [PATCH v5 5/7] pinctrl: ingenic: Add X2600 pin groups and functions H. Nikolaus Schaller
2026-11-25 6:49 ` [PATCH v5 6/7] pinctrl: ingenic: Handle X2600 Port E Schmitt trigger H. Nikolaus Schaller
2026-11-25 14:34 ` Paul Cercueil
2026-11-25 14:51 ` H. Nikolaus Schaller
2026-11-25 14:56 ` Paul Cercueil [this message]
2026-11-25 6:49 ` [PATCH v5 7/7] pinctrl: ingenic: Handle X2600 Port E pull configuration H. Nikolaus Schaller
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=1a6496e133cdc2477931cbc2f95f3c647093b040.camel@crapouillou.net \
--to=paul@crapouillou.net \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hns@goldelico.com \
--cc=krzk+dt@kernel.org \
--cc=letux-kernel@openphoenux.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=robh@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
all inboxes | Powered by JetHome®