Re: [PATCH v1 0/2] pinctrl / 8250_dw: Allow drivers to keep init pinctrl state until first open

From: Linus Walleij

Date: Wed Aug 12 2026 - 03:51:28 EST


Hi Doug,

On Tue, Aug 11, 2026 at 10:15 PM Doug Anderson <dianders@xxxxxxxxxxxx> wrote:

> One thing I guess we'd have to work out is whether we'd really want to
> use "default" and "open". I usually think of "default" as the active
> state and then the two common states "sleep" and "idle" as the
> inactive states. I guess looking at all the states, maybe you'd
> suggest:
>
> * At probe time, select "default" state since the port is closed.
> * At port open time, select "open" state if it exists.
> * If a port runtime suspends while open, select "idle" state if it exists.
> * If a port runtime resumes while open, try to select "open" if it
> exists, or fallback to "default".
> * If a port does system suspend while open, select "sleep" state if it exists.
> * If a port does system resume while open, try to select "open" if it
> exists, or fallback to "default".
> * If any kind of suspend/resume happens while a port is closed, it
> stays in "default"
>
> The above assumes that if a port is closed that it doesn't need /
> shouldn't transition to "sleep" / "idle" states. That's probably true
> (?) for any port that defines an "open" state, implying that "default"
> means "closed". If someone only defines "default" and "sleep" or
> "idle", though, maybe they'd expect transitions to "sleep" / "idle" at
> suspend time?
>
> Does that sound roughly like what you're thinking?

Attention to detail is officially your middle name Doug!

It's what I would have been thinking, if I had sat down and
had the same attention to detail.

So I really like what I'm seeing here, go ahead with this
design, provided it checks out and you can somewhat test
it. I guess you have hardware where you can actually test
the hairy transitions between open, idle, sleep etc and that
is more than most will do.

Yours,
Linus Walleij