diff mbox series

[v2] serial: sa1100: add note about modem control signals

Message ID E1hWjyQ-0008Ni-8V@rmk-PC.armlinux.org.uk (mailing list archive)
State New, archived
Headers show
Series [v2] serial: sa1100: add note about modem control signals | expand

Commit Message

Russell King (Oracle) May 31, 2019, 4:01 p.m. UTC
As suggested by Uwe, add a note indicating that the modem control
signals do not support interrupts, which precludes the driver from
using mctrl_gpio_init().

Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/tty/serial/sa1100.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Uwe Kleine-König May 31, 2019, 9:27 p.m. UTC | #1
Hello Russell,

On Fri, May 31, 2019 at 05:01:42PM +0100, Russell King wrote:
> As suggested by Uwe, add a note indicating that the modem control
> signals do not support interrupts, which precludes the driver from
> using mctrl_gpio_init().
> 
> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
>  drivers/tty/serial/sa1100.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/tty/serial/sa1100.c b/drivers/tty/serial/sa1100.c
> index 97bdfeccbea9..8e618129e65c 100644
> --- a/drivers/tty/serial/sa1100.c
> +++ b/drivers/tty/serial/sa1100.c
> @@ -860,6 +860,10 @@ static int sa1100_serial_resume(struct platform_device *dev)
>  static int sa1100_serial_add_one_port(struct sa1100_port *sport, struct platform_device *dev)
>  {
>  	sport->port.dev = &dev->dev;
> +
> +	// mctrl_gpio_init() requires that the GPIO driver supports interrupts,
> +	// but we need to support GPIO drivers for hardware that has no such
> +	// interrupts.  Use mctrl_gpio_init_noauto() instead.

I hope it's not an impostor who claimed to be Linus to spread deviance
from K&R :-)

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

If you want to, squash this in the commit that introduced
mctrl_gpio_init_noauto while keeping my Ack on the resulting patch.

Best regards
Uwe

>  	sport->gpios = mctrl_gpio_init_noauto(sport->port.dev, 0);
>  	if (IS_ERR(sport->gpios)) {
>  		int err = PTR_ERR(sport->gpios);
> -- 
> 2.7.4
> 
>
Russell King (Oracle) June 4, 2019, 11:16 a.m. UTC | #2
On Fri, May 31, 2019 at 11:27:02PM +0200, Uwe Kleine-König wrote:
> Hello Russell,
> 
> On Fri, May 31, 2019 at 05:01:42PM +0100, Russell King wrote:
> > As suggested by Uwe, add a note indicating that the modem control
> > signals do not support interrupts, which precludes the driver from
> > using mctrl_gpio_init().
> > 
> > Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> > ---
> >  drivers/tty/serial/sa1100.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/tty/serial/sa1100.c b/drivers/tty/serial/sa1100.c
> > index 97bdfeccbea9..8e618129e65c 100644
> > --- a/drivers/tty/serial/sa1100.c
> > +++ b/drivers/tty/serial/sa1100.c
> > @@ -860,6 +860,10 @@ static int sa1100_serial_resume(struct platform_device *dev)
> >  static int sa1100_serial_add_one_port(struct sa1100_port *sport, struct platform_device *dev)
> >  {
> >  	sport->port.dev = &dev->dev;
> > +
> > +	// mctrl_gpio_init() requires that the GPIO driver supports interrupts,
> > +	// but we need to support GPIO drivers for hardware that has no such
> > +	// interrupts.  Use mctrl_gpio_init_noauto() instead.
> 
> I hope it's not an impostor who claimed to be Linus to spread deviance
> from K&R :-)
> 
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> If you want to, squash this in the commit that introduced
> mctrl_gpio_init_noauto while keeping my Ack on the resulting patch.

I'd prefer to keep it separate to avoid invalidating the acks that I
already have on the first patch.
diff mbox series

Patch

diff --git a/drivers/tty/serial/sa1100.c b/drivers/tty/serial/sa1100.c
index 97bdfeccbea9..8e618129e65c 100644
--- a/drivers/tty/serial/sa1100.c
+++ b/drivers/tty/serial/sa1100.c
@@ -860,6 +860,10 @@  static int sa1100_serial_resume(struct platform_device *dev)
 static int sa1100_serial_add_one_port(struct sa1100_port *sport, struct platform_device *dev)
 {
 	sport->port.dev = &dev->dev;
+
+	// mctrl_gpio_init() requires that the GPIO driver supports interrupts,
+	// but we need to support GPIO drivers for hardware that has no such
+	// interrupts.  Use mctrl_gpio_init_noauto() instead.
 	sport->gpios = mctrl_gpio_init_noauto(sport->port.dev, 0);
 	if (IS_ERR(sport->gpios)) {
 		int err = PTR_ERR(sport->gpios);