Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Doug Anderson <dianders@chromium.org>
Cc: "Linus Walleij" <linusw@kernel.org>,
	"Michał Kardaś" <mkmkl@google.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Vic Huang" <vich@google.com>,
	linux-gpio@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 0/2] pinctrl / 8250_dw: Allow drivers to keep init pinctrl state until first open
Date: Wed, 12 Aug 2026 09:51:29 +0300	[thread overview]
Message-ID: <anwX8bn9emSOUOOJ@ashevche-desk.local> (raw)
In-Reply-To: <CAD=FV=UoZ=CoUdku5aaJr9uihxr0Q-Yj4UQeQtYeODMzku7LkA@mail.gmail.com>

On Tue, Aug 11, 2026 at 01:15:27PM -0700, Doug Anderson wrote:
> On Tue, Aug 11, 2026 at 11:47 AM Linus Walleij <linusw@kernel.org> wrote:

...

> > > > What if this is not good for all devices?
> > >
> > > At the moment, I couldn't find any device that the above rules would
> > > break. Certainly I could have missed something.
> >
> > No you're right, nothing breaks other than the that for one
> > instance of a driver the default/init semantics change.
> > Which isn't elegant IMO, but it works.
> >
> > > Definitely the things Michał wants to achieve can be done without
> > > changing the pinctrl core by using named pinctrl states and
> > > transitioning at the right times.
> >
> > I think we need to do that. This approach is a hack, it will be
> > hard for others to understand and lead to a lot of questions
> > about why this is done and so on. Better use a custom state.
> 
> Sure, that's a fair argument. To me, it felt like adding the extra
> state was more of a hack / working around the pinctrl limitations, but
> I can certainly see both perspectives.

FWIW, I'm also with Linus here, the fixing code and make exceptions smells like
a hack. Even having duplicating states with different names (mean semantics) is
much better approach.

...

> * 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"

Not sure about this one as it might be tricky for the case with OOB wake.
Yeah, it's questionable if we want wake source on never opened port
(kernel console?).

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2026-08-12  6:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 13:06 [PATCH v1 0/2] pinctrl / 8250_dw: Allow drivers to keep init pinctrl state until first open Michał Kardaś
2026-08-10 13:06 ` [PATCH v1 1/2] pinctrl: core: Allow drivers to keep "init" pinctrl state after probe Michał Kardaś
2026-08-10 18:12   ` Andy Shevchenko
2026-08-10 13:06 ` [PATCH v1 2/2] tty: serial: 8250_dw: Keep init pinctrl state until first open Michał Kardaś
2026-08-10 18:17   ` Andy Shevchenko
2026-08-11  6:36   ` Linus Walleij
2026-08-11  6:34 ` [PATCH v1 0/2] pinctrl / 8250_dw: Allow drivers to keep " Linus Walleij
2026-08-11 17:00   ` Doug Anderson
2026-08-11 18:47     ` Linus Walleij
2026-08-11 20:15       ` Doug Anderson
2026-08-12  1:26         ` Doug Anderson
2026-08-12  7:00           ` Andy Shevchenko
2026-08-12 16:28             ` Doug Anderson
2026-08-12  6:51         ` Andy Shevchenko [this message]
2026-08-12  7:46         ` Linus Walleij

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=anwX8bn9emSOUOOJ@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mkmkl@google.com \
    --cc=vich@google.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