From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-arm-kernel@lists.infradead.org,
linux-serial@vger.kernel.org, Jiri Slaby <jslaby@suse.com>
Subject: Re: [PATCH 1/6] serial: sa1100: add support for mctrl gpios
Date: Fri, 31 May 2019 15:01:28 +0100 [thread overview]
Message-ID: <20190531140127.yp2o7effrsxencyb@shell.armlinux.org.uk> (raw)
In-Reply-To: <20190531135658.jo4kas3ozj7gpmmc@pengutronix.de>
On Fri, May 31, 2019 at 03:56:58PM +0200, Uwe Kleine-König wrote:
> On Fri, May 31, 2019 at 02:23:40PM +0100, Russell King - ARM Linux admin wrote:
> > On Fri, May 31, 2019 at 02:50:13PM +0200, Uwe Kleine-König wrote:
> > > On Fri, May 31, 2019 at 12:13:47PM +0100, Russell King wrote:
> > > > +static int sa1100_serial_add_one_port(struct sa1100_port *sport, struct platform_device *dev)
> > > > +{
> > > > + sport->port.dev = &dev->dev;
> > > > + sport->gpios = mctrl_gpio_init_noauto(sport->port.dev, 0);
> > >
> > > the _noauto function was only introduced to ease a transition. I think
> > > the driver would benefit to use mctrl_gpio_init() instead.
> >
> > In what way would the driver benefit? mctrl_gpio_init() requires that
> > there are IRQs for each input GPIO. This is not the case with most
> > SA11x0 platforms, where the GPIO controls are implemented using simple
> > latches, hence that interface is entirely unsuitable.
>
> Ah, but then you can only use the outputs reliably here as an edge on
> (say) CTS stays unnoticed with both mctrl_gpio_init() and
> mctrl_gpio_init_noauto().
Right that is a risk with a polled approach, but that is the approach
that the SA1100 serial driver has taken ever since it was written
almost twenty years ago, and no one has raised any concerns about
that until now.
> Unless I miss something (which is quite possible given that it's quite
> some time ago I looked into mctrl_gpio) with mctrl_gpio_init_noauto()
> having a CTS-gpio is just ignored unless the modem ctrl lines are
> explicitely requestet while with mctrl_gpio_init() it results in an
> error. Isn't the error the better alternative?
Unless the serial driver polls the modem control line status, which
the SA1100 driver continues to do in exactly the same way after this
conversion.
Do you suggest that we just regress the driver by ripping out this
support that no one has had any problems with, and that is known to
work sufficiently in its day, just because we now don't like it?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
next prev parent reply other threads:[~2019-05-31 14:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 11:12 [PATCH 0/6] Convert sa1100 serial to use mctrl gpios Russell King - ARM Linux admin
2019-05-31 11:13 ` [PATCH 1/6] serial: sa1100: add support for " Russell King
2019-05-31 12:50 ` Uwe Kleine-König
2019-05-31 13:23 ` Russell King - ARM Linux admin
2019-05-31 13:56 ` Uwe Kleine-König
2019-05-31 14:01 ` Russell King - ARM Linux admin [this message]
2019-05-31 15:10 ` Uwe Kleine-König
2019-05-31 15:24 ` [PATCH] serial: sa1100: add note about modem control signals Russell King
2019-05-31 15:31 ` Uwe Kleine-König
2019-05-31 15:57 ` Russell King - ARM Linux admin
2019-05-31 16:01 ` [PATCH v2] " Russell King
2019-05-31 21:27 ` Uwe Kleine-König
2019-06-04 11:16 ` Russell King - ARM Linux admin
2019-05-31 11:13 ` [PATCH 2/6] ARM: sa1100/assabet: convert serial to gpiod APIs Russell King
2019-05-31 11:13 ` [PATCH 3/6] ARM: sa1100/h3xxx: " Russell King
2019-05-31 11:14 ` [PATCH 4/6] ARM: sa1100/badge4: remove commented out modem control initialisers Russell King
2019-05-31 11:14 ` [PATCH 5/6] ARM: sa1100/hackkit: remove empty serial mctrl functions Russell King
2019-05-31 11:14 ` [PATCH 6/6] ARM: sa1100/neponset: convert serial to use gpiod APIs Russell King
-- strict thread matches above, loose matches on Subject: below --
2016-08-29 12:05 [PATCH 0/6] SA11x0 serial updates Russell King - ARM Linux
2016-08-29 12:05 ` [PATCH 1/6] serial: sa1100: add support for mctrl gpios Russell King
2016-08-31 13:25 ` Greg Kroah-Hartman
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=20190531140127.yp2o7effrsxencyb@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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).