linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] serial: imx: support enabling rs485 at boot time with DT option
@ 2017-04-18 16:54 Alexey Ignatov
  2017-04-18 16:54 ` [PATCH 2/2] serial: imx: allow enabling RX during TX operation " Alexey Ignatov
  2017-04-18 17:36 ` [PATCH 1/2] serial: imx: support enabling rs485 at boot time " Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Ignatov @ 2017-04-18 16:54 UTC (permalink / raw)
  To: linux-kernel, linux-serial; +Cc: Uwe Kleine-König, Alexey Ignatov

Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
---
 drivers/tty/serial/imx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index a70356dad1b7..38c55c309953 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2048,6 +2048,8 @@ static int serial_imx_probe_dt(struct imx_port *sport,
 	if (of_get_property(np, "fsl,dte-mode", NULL))
 		sport->dte_mode = 1;
 
+	if (of_property_read_bool(np, "linux,rs485-enabled-at-boot-time"))
+		sport->port.rs485.flags |= SER_RS485_ENABLED;
 	return 0;
 }
 #else
@@ -2109,7 +2111,7 @@ static int serial_imx_probe(struct platform_device *pdev)
 	sport->port.fifosize = 32;
 	sport->port.ops = &imx_pops;
 	sport->port.rs485_config = imx_rs485_config;
-	sport->port.rs485.flags =
+	sport->port.rs485.flags |=
 		SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX;
 	sport->port.flags = UPF_BOOT_AUTOCONF;
 	init_timer(&sport->timer);
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] serial: imx: allow enabling RX during TX operation with DT option
  2017-04-18 16:54 [PATCH 1/2] serial: imx: support enabling rs485 at boot time with DT option Alexey Ignatov
@ 2017-04-18 16:54 ` Alexey Ignatov
  2017-04-18 17:36 ` [PATCH 1/2] serial: imx: support enabling rs485 at boot time " Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Alexey Ignatov @ 2017-04-18 16:54 UTC (permalink / raw)
  To: linux-kernel, linux-serial; +Cc: Uwe Kleine-König, Alexey Ignatov

This commit changes the driver behaviour: new default is no RX during
TX when RS485 is also enabled, so boards requiring this should explicitly
enable rs485-rx-during-tx in their device trees.

Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
---
 drivers/tty/serial/imx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 38c55c309953..a1d4ed71312f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2050,6 +2050,10 @@ static int serial_imx_probe_dt(struct imx_port *sport,
 
 	if (of_property_read_bool(np, "linux,rs485-enabled-at-boot-time"))
 		sport->port.rs485.flags |= SER_RS485_ENABLED;
+	
+	if (of_get_property(np, "rs485-rx-during-tx", NULL))
+		sport->port.rs485.flags |= SER_RS485_RX_DURING_TX;
+
 	return 0;
 }
 #else
@@ -2112,7 +2116,7 @@ static int serial_imx_probe(struct platform_device *pdev)
 	sport->port.ops = &imx_pops;
 	sport->port.rs485_config = imx_rs485_config;
 	sport->port.rs485.flags |=
-		SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX;
+		SER_RS485_RTS_ON_SEND;
 	sport->port.flags = UPF_BOOT_AUTOCONF;
 	init_timer(&sport->timer);
 	sport->timer.function = imx_timeout;
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] serial: imx: support enabling rs485 at boot time with DT option
  2017-04-18 16:54 [PATCH 1/2] serial: imx: support enabling rs485 at boot time with DT option Alexey Ignatov
  2017-04-18 16:54 ` [PATCH 2/2] serial: imx: allow enabling RX during TX operation " Alexey Ignatov
@ 2017-04-18 17:36 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2017-04-18 17:36 UTC (permalink / raw)
  To: Alexey Ignatov; +Cc: linux-kernel, linux-serial, Uwe Kleine-König

On Tue, Apr 18, 2017 at 07:54:33PM +0300, Alexey Ignatov wrote:
> Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
> ---
>  drivers/tty/serial/imx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

I can't take patches without any changelog text at all, sorry.

And you forgot to cc: the maintainer of the subsystem you are writing a
patch for, not a good way to get it accepted :)

Please use scripts/get_maintainer.pl to help you out.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-18 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 16:54 [PATCH 1/2] serial: imx: support enabling rs485 at boot time with DT option Alexey Ignatov
2017-04-18 16:54 ` [PATCH 2/2] serial: imx: allow enabling RX during TX operation " Alexey Ignatov
2017-04-18 17:36 ` [PATCH 1/2] serial: imx: support enabling rs485 at boot time " Greg KH

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).