public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Conor Dooley <conor.dooley@microchip.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org,
	Valentina.FernandezAlanis@microchip.com,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [RFC v1 2/4] pinctrl: add polarfire soc mssio pinctrl driver
Date: Thu, 20 Nov 2025 00:26:43 +0000	[thread overview]
Message-ID: <20251120-silicon-oyster-5d973ff822d9@spud> (raw)
In-Reply-To: <CACRpkda3Oz+K1t38QKgWipEseJxxneBSC11sFvzpB7ycnqsjBA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3017 bytes --]

On Wed, Nov 19, 2025 at 10:48:07PM +0100, Linus Walleij wrote:
> On Wed, Nov 19, 2025 at 7:23 PM Conor Dooley <conor@kernel.org> wrote:
> > On Wed, Nov 19, 2025 at 01:08:26PM +0100, Linus Walleij wrote:
> > > On Wed, Nov 12, 2025 at 3:33 PM Conor Dooley <conor@kernel.org> wrote:
> 
> > > > +       //TODO @Linus, it correct to group these 3? There's no control over voltage.
> > > > +       case PIN_CONFIG_INPUT_SCHMITT:
> > > > +       case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
> > > > +       case PIN_CONFIG_INPUT_SCHMITT_UV:
> > >
> > > Consider not supporting some like PIN_CONFIG_INPUT_SCHMITT_UV
> > > in the bindings if they don't make any sense, and let it just return error
> > > if someone tries to do that.
> > >
> > > Isn't PIN_CONFIG_INPUT_SCHMITT_ENABLE the only one that
> > > makes sense for this hardware?
> >
> > Yeah, I just didn't know if having the others was helpful, since they
> > say things like:
> >  * @PIN_CONFIG_INPUT_SCHMITT: this will configure an input pin to run in
> >  *      schmitt-trigger mode. If the schmitt-trigger has adjustable hysteresis,
> >  *      the threshold value is given on a custom format as argument when
> >  *      setting pins to this mode.
> > which implies they should be implemented for systen not permitting
> > hysteresis adjustment.
> 
> I see.
> 
> I looked at the bindings that look like this and are not 1:1 to the
> in-kernel configs:
> 
>   input-schmitt-enable:
>     type: boolean
>     description: enable schmitt-trigger mode
> 
>   input-schmitt-disable:
>     type: boolean
>     description: disable schmitt-trigger mode
> 
>   input-schmitt-microvolt:
>     description: threshold strength for schmitt-trigger
> 
> 1. input-schmitt is missing! But it is right there in
> drivers/pinctrl/pinconf-generic.c ... All DTS files appear to be
> using input-schmitt-enable/disable and -microvolt.
> 
> 2. input-schmitt-microvolt should probably be used separately
> to set the voltage threshold and can be used in conjunction
> with input-schmitt-enable in the same node. In your case
> you probably don't want to use it at all and disallow it.
> 
> They are all treated individually in the parser.
> 
> Maybe we could patch the docs in pinconf-generic.h to make it clear that
> they are all mutually exclusive.
> 
> The DT parser is a bit primitive for these.
> For example right now it is fine with the schema
> to set input-schmitt-enable and input-schmitt-disable at the same time, and
> the result will be enabled because of parse order :/

> The real trick would be to also make the
> schema in Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml
> make them at least mutually exclusive and deprecate the
> input-schmitt that noone is using, maybe that is simpler than I think?

I think that this is probably what to do. Mutual exclusion isn't
difficult to set up there and if there's no property for "input-schmitt"
then deprecating it sounds pretty reasonable?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-11-20  0:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 14:31 [RFC v1 0/4] Microchip mpfs/pic64gx pinctrl part 2 Conor Dooley
2025-11-12 14:31 ` [RFC v1 1/4] dt-bindings: pinctrl: document polarfire soc mssio pin controller Conor Dooley
2025-11-19  9:13   ` Linus Walleij
2025-11-12 14:31 ` [RFC v1 2/4] pinctrl: add polarfire soc mssio pinctrl driver Conor Dooley
2025-11-19 12:08   ` Linus Walleij
2025-11-19 18:23     ` Conor Dooley
2025-11-19 21:48       ` Linus Walleij
2025-11-20  0:26         ` Conor Dooley [this message]
2025-11-20 23:13           ` Linus Walleij
2025-11-21 10:46             ` Conor Dooley
2025-11-21 11:21               ` Conor Dooley
2025-11-24 17:16                 ` Conor Dooley
2025-11-25  0:31                   ` Linus Walleij
2025-11-25  1:03                     ` Conor Dooley
2025-11-25 16:09                       ` Linus Walleij
2025-11-25  0:10                 ` Linus Walleij
2025-11-25  0:24                   ` Conor Dooley
2025-11-24 19:14     ` Conor Dooley
2025-11-25 13:24       ` Linus Walleij
2025-11-25 17:47         ` Conor Dooley
2025-11-25 19:28           ` Linus Walleij
2025-11-25 19:55             ` Conor Dooley
2025-11-25 19:59               ` Linus Walleij
2025-11-12 14:31 ` [RFC v1 3/4] MAINTAINERS: add Microchip mpfs mssio driver/bindings to entry Conor Dooley
2025-11-12 14:31 ` [RFC v1 4/4] riscv: dts: microchip: add pinctrl nodes for mpfs/icicle kit Conor Dooley
2025-11-19 12:16 ` [RFC v1 0/4] Microchip mpfs/pic64gx pinctrl part 2 Linus Walleij
2025-11-19 18:06   ` Conor Dooley
2025-11-19 21:31     ` Linus Walleij
2025-11-20  0:25       ` Conor Dooley

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=20251120-silicon-oyster-5d973ff822d9@spud \
    --to=conor@kernel.org \
    --cc=Valentina.FernandezAlanis@microchip.com \
    --cc=brgl@bgdev.pl \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@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