linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugo Villeneuve <hugo@hugovil.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	jirislaby@kernel.org, jringle@gridpoint.com,
	isaac.true@canonical.com, jesse.sung@canonical.com,
	tomasz.mon@camlingroup.com, l.perczak@camlintechnologies.com,
	linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	Hugo Villeneuve <hvilleneuve@dimonoff.com>,
	stable@vger.kernel.org,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Lech Perczak <lech.perczak@camlingroup.com>
Subject: Re: [RESEND PATCH v8 06/10] serial: sc16is7xx: fix regression with GPIO configuration
Date: Thu, 3 Aug 2023 17:38:54 -0400	[thread overview]
Message-ID: <20230803173854.efdda6d30d88b85ee101ce6b@hugovil.com> (raw)
In-Reply-To: <CAL_JsqK-qbz=w2a00EXh_e1XmY1gF1nvxih7AOYXw+VuMXhnmw@mail.gmail.com>

On Thu, 3 Aug 2023 14:10:30 -0600
Rob Herring <robh+dt@kernel.org> wrote:

> On Thu, Aug 3, 2023 at 11:54 AM Hugo Villeneuve <hugo@hugovil.com> wrote:
> >
> > On Mon, 31 Jul 2023 14:41:15 -0400
> > Hugo Villeneuve <hugo@hugovil.com> wrote:
> >
> > > On Mon, 31 Jul 2023 12:04:45 -0600
> > > Rob Herring <robh+dt@kernel.org> wrote:
> > >
> > > > On Mon, Jul 31, 2023 at 10:46 AM Hugo Villeneuve <hugo@hugovil.com> wrote:
> > > > >
> > > > > On Mon, 31 Jul 2023 09:31:53 -0600
> > > > > Rob Herring <robh+dt@kernel.org> wrote:
> > > > >
> > > > > > On Mon, Jul 24, 2023 at 9:54 AM Hugo Villeneuve <hugo@hugovil.com> wrote:
> > > > > > >
> > > > > > > On Sat, 22 Jul 2023 17:15:26 +0200
> > > > > > > Greg KH <gregkh@linuxfoundation.org> wrote:
> > > > > > >
> > > > > > > > On Sat, Jul 22, 2023 at 10:47:24AM -0400, Hugo Villeneuve wrote:
> > > > > > > > > On Fri, 21 Jul 2023 13:24:19 -0600
> > > > > > > > > Rob Herring <robh+dt@kernel.org> wrote:
> > > > > > > > >
> > > > > > > > > > On Fri, Jul 21, 2023 at 10:19 AM Hugo Villeneuve <hugo@hugovil.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > > > > > > > > > >
> > > > > > > > > > > Commit 679875d1d880 ("sc16is7xx: Separate GPIOs from modem control lines")
> > > > > > > > > > > and commit 21144bab4f11 ("sc16is7xx: Handle modem status lines")
> > > > > > > > > > > changed the function of the GPIOs pins to act as modem control
> > > > > > > > > > > lines without any possibility of selecting GPIO function.
> > > > > > > > > >
> > > > > > > > > > Requiring a new DT property is not fixing a kernel regression. You
> > > > > > > > > > should be returning the kernel to original behavior and then have a
> > > > > > > > > > new DT property for new behavior.
> > > > > > > > >
> > > > > > > > > Hi Rob,
> > > > > > > > > please read the entire patch history starting from V1
> > > > > > > > >  and you will understand why this course of action was
> > > > > > > > >  not selected.
> > > > > > > >
> > > > > > > > That's not going to happen, sorry, you need to explain it here, in this
> > > > > > > > patch series, why a specific action is being taken over another one, as
> > > > > > > > no one has time to go dig through past history, sorry.
> > > > > > >
> > > > > > > Hi Rob,
> > > > > > > I initially submitted a patch to revert the kernel to original
> > > > > > > behavior, but it created more problems because the patch was
> > > > > > > unfortunately split in two separate patches, and mixed with other non
> > > > > > > closely-related changes. It was also noted to me that reverting to the
> > > > > > > old behavior would break things for some users.
> > > > > > >
> > > > > > > It was suggested to me by a more experienced kernel developer to
> > > > > > > "suggest a fix, instead of hurrying a revert":
> > > > > > >
> > > > > > >     https://lkml.org/lkml/2023/5/17/758
> > > > > >
> > > > > > Do I have to go read this to decipher the justification and reasoning?
> > > > > > When Greg says "in this patch series", he means in the commit messages
> > > > > > of the patches. You send v9 already and it doesn't have that. The
> > > > > > patchset needs to stand on its own summarizing any relevant prior
> > > > > > discussions.
> > > > > >
> > > > > > I never suggested doing a revert.
> > > > >
> > > > > Hi Rob,
> > > > > I am sorry, but this is exactly what I "deciphered" from your
> > > > > original email.
> > > > >
> > > > > I am trying very hard to understand exactly what you mean, but it is
> > > > > not that obvious for me. If something is not clear in my commit message,
> > > > > I will try to improve it. But before, let's try to focus on making sure
> > > > > I understand more clearly what you want exactly.
> > > > >
> > > > > > Obviously, someone still wants the
> > > > > > new feature.
> > > > >
> > > > > I assume that you refer to the "new feature" as what was added in
> > > > > the commit 679875d1d880 ("sc16is7xx: Separate GPIOs from modem control
> > > > > lines")?
> > > >
> > > > Shrug. It's one of the 2 commits mentioned, I don't know which one
> > > > exactly. Whichever one changed default behavior from use GPIOs to use
> > > > modem ctrl lines.
> > > >
> > > > Reading it again, I *think* this patch is correct. Default behavior is
> > > > restored to use GPIOs. The DT property is needed to enable modem ctrl
> > > > lines.
> > >
> > > Hi,
> > > this is correct.
> > >
> > >
> > > > What's not okay is just saying, these platforms may or may not need an update:
> > > >
> > > >     arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
> > > >     mips/boot/dts/ingenic/cu1830-neo.dts
> > > >     mips/boot/dts/ingenic/cu1000-neo.dts
> > >
> > > Yes, my bad. I initially mentioned them and hoped to get some
> > > feedback, which I never got, and I kind of forgot about it.
> > >
> > > > You need to figure that out. Have you checked with maintainers of
> > > > these boards? When were they added and by who? At the same time or by
> > > > the same person would be a good indication the platform uses modem
> > > > ctrl lines. Or were these platforms in use before adding modem ctrl
> > > > support? Then they probably use GPIOs or nothing.
> > > >
> > > > If there are platforms which would regress if the modem ctrl feature
> > > > was just reverted, which ones are those?
> > >
> > > Ok, let me do some checks and get back to you on this.
> >
> > Hi Rob,
> > for this board:
> >     arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
> >
> > it uses a SC16IS740, which doesn't have any GPIOs nor modem
> > control lines, so no DT changes required.
> >
> > For these two Ingenic boards:
> >     mips/boot/dts/ingenic/cu1830-neo.dts
> >     mips/boot/dts/ingenic/cu1000-neo.dts
> >
> > They use a SC16IS752, which has shared modem control lines and GPIOs.
> > Unfortunately, the maintainers have not (yet) responded to my
> > inquiries. Also, I tried to search for schematics or block diagrams on
> > the net but couldn't find anything.
> >
> > These platforms were in use before the patch to add the modem control
> > lines was added. Then like you said they probably use these shared
> > lines as GPIOs or nothing, so no DT changes would be required.
> 
> Okay, that's useful (please add to the commit msg).

I added the information in the cover letter, but I can add it to the
actual patch commit message if you prefer.

> Still, what platform(s) need the modem control feature? Presumably
> that's whatever platform Lech and Tomasz work on. I guess given the
> Reviewed-by they are fine with needing a DT change.

Ok. I have previously also emailed Lech about that, but he has not
responded yet.

Thank you,
Hugo.

  reply	other threads:[~2023-08-03 21:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 16:18 [RESEND PATCH v8 00/10] serial: sc16is7xx: fix GPIO regression and rs485 improvements Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 01/10] serial: sc16is7xx: fix broken port 0 uart init Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 02/10] serial: sc16is7xx: mark IOCONTROL register as volatile Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 03/10] serial: sc16is7xx: remove obsolete out_thread label Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 04/10] serial: sc16is7xx: refactor GPIO controller registration Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 05/10] dt-bindings: sc16is7xx: Add property to change GPIO function Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 06/10] serial: sc16is7xx: fix regression with GPIO configuration Hugo Villeneuve
2023-07-21 19:24   ` Rob Herring
2023-07-22 14:47     ` Hugo Villeneuve
2023-07-22 15:15       ` Greg KH
2023-07-24 15:54         ` Hugo Villeneuve
2023-07-31 15:31           ` Rob Herring
2023-07-31 16:46             ` Hugo Villeneuve
2023-07-31 18:04               ` Rob Herring
2023-07-31 18:41                 ` Hugo Villeneuve
2023-08-03 17:54                   ` Hugo Villeneuve
2023-08-03 20:10                     ` Rob Herring
2023-08-03 21:38                       ` Hugo Villeneuve [this message]
2023-08-07 14:55                         ` Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 07/10] serial: sc16is7xx: fix bug when first setting GPIO direction Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 08/10] serial: sc16is7xx: add call to get rs485 DT flags and properties Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 09/10] serial: sc16is7xx: add post reset delay Hugo Villeneuve
2023-07-21 16:18 ` [RESEND PATCH v8 10/10] serial: sc16is7xx: improve comments about variants Hugo Villeneuve

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=20230803173854.efdda6d30d88b85ee101ce6b@hugovil.com \
    --to=hugo@hugovil.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hvilleneuve@dimonoff.com \
    --cc=isaac.true@canonical.com \
    --cc=jesse.sung@canonical.com \
    --cc=jirislaby@kernel.org \
    --cc=jringle@gridpoint.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=l.perczak@camlintechnologies.com \
    --cc=lech.perczak@camlingroup.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tomasz.mon@camlingroup.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).