All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Kepplinger <martin.kepplinger@ginzinger.com>
To: <gregkh@linuxfoundation.org>, <robh+dt@kernel.org>,
	<mark.rutland@arm.com>, <jslaby@suse.com>, <corbet@lwn.net>,
	<richard.genoud@gmail.com>, <nicolas.ferre@microchip.com>,
	<alexandre.belloni@bootlin.com>,
	<ludovic.desroches@microchip.com>, <mcoquelin.stm32@gmail.com>,
	<alexandre.torgue@st.com>, <linux-serial@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-stm32@st-md-mailman.stormreply.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH 7/9] serial: atmel_serial: set SER_RS485_DELAY_IN_USEC accordingly
Date: Wed, 20 Feb 2019 16:31:17 +0100	[thread overview]
Message-ID: <20190220153119.4423-2-martin.kepplinger@ginzinger.com> (raw)
In-Reply-To: <20190220153119.4423-1-martin.kepplinger@ginzinger.com>

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

Unset the SER_RS485_DELAY_IN_USEC flag during rs485 config for
userspace to get the correct setting.

Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
---
 drivers/tty/serial/atmel_serial.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 05147fe24343..36ab1c131d36 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -346,6 +346,9 @@ static int atmel_config_rs485(struct uart_port *port,
 
 	port->rs485 = *rs485conf;
 
+	/* delays are in milliseconds */
+	rs485conf->flags &= ~SER_RS485_DELAY_IN_USEC;
+
 	if (rs485conf->flags & SER_RS485_ENABLED) {
 		dev_dbg(port->dev, "Setting UART to RS485\n");
 		atmel_port->tx_done_mask = ATMEL_US_TXEMPTY;
-- 
2.20.1


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3616 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Martin Kepplinger <martin.kepplinger@ginzinger.com>
To: gregkh@linuxfoundation.org, robh+dt@kernel.org,
	mark.rutland@arm.com, jslaby@suse.com, corbet@lwn.net,
	richard.genoud@gmail.com, nicolas.ferre@microchip.com,
	alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com,
	mcoquelin.stm32@gmail.com, alexandre.torgue@st.com,
	linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 7/9] serial: atmel_serial: set SER_RS485_DELAY_IN_USEC accordingly
Date: Wed, 20 Feb 2019 16:31:17 +0100	[thread overview]
Message-ID: <20190220153119.4423-2-martin.kepplinger@ginzinger.com> (raw)
In-Reply-To: <20190220153119.4423-1-martin.kepplinger@ginzinger.com>

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

Unset the SER_RS485_DELAY_IN_USEC flag during rs485 config for
userspace to get the correct setting.

Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
---
 drivers/tty/serial/atmel_serial.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 05147fe24343..36ab1c131d36 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -346,6 +346,9 @@ static int atmel_config_rs485(struct uart_port *port,
 
 	port->rs485 = *rs485conf;
 
+	/* delays are in milliseconds */
+	rs485conf->flags &= ~SER_RS485_DELAY_IN_USEC;
+
 	if (rs485conf->flags & SER_RS485_ENABLED) {
 		dev_dbg(port->dev, "Setting UART to RS485\n");
 		atmel_port->tx_done_mask = ATMEL_US_TXEMPTY;
-- 
2.20.1


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3616 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Martin Kepplinger <martin.kepplinger@ginzinger.com>
To: <gregkh@linuxfoundation.org>, <robh+dt@kernel.org>,
	<mark.rutland@arm.com>, <jslaby@suse.com>, <corbet@lwn.net>,
	<richard.genoud@gmail.com>, <nicolas.ferre@microchip.com>,
	<alexandre.belloni@bootlin.com>,
	<ludovic.desroches@microchip.com>, <mcoquelin.stm32@gmail.com>,
	<alexandre.torgue@st.com>, <linux-serial@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-stm32@st-md-mailman.stormreply.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 7/9] serial: atmel_serial: set SER_RS485_DELAY_IN_USEC accordingly
Date: Wed, 20 Feb 2019 16:31:17 +0100	[thread overview]
Message-ID: <20190220153119.4423-2-martin.kepplinger@ginzinger.com> (raw)
In-Reply-To: <20190220153119.4423-1-martin.kepplinger@ginzinger.com>


[-- Attachment #1.1: Type: text/plain, Size: 800 bytes --]

Unset the SER_RS485_DELAY_IN_USEC flag during rs485 config for
userspace to get the correct setting.

Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
---
 drivers/tty/serial/atmel_serial.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 05147fe24343..36ab1c131d36 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -346,6 +346,9 @@ static int atmel_config_rs485(struct uart_port *port,
 
 	port->rs485 = *rs485conf;
 
+	/* delays are in milliseconds */
+	rs485conf->flags &= ~SER_RS485_DELAY_IN_USEC;
+
 	if (rs485conf->flags & SER_RS485_ENABLED) {
 		dev_dbg(port->dev, "Setting UART to RS485\n");
 		atmel_port->tx_done_mask = ATMEL_US_TXEMPTY;
-- 
2.20.1


[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3616 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-02-20 15:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20 15:31 [PATCH 6/9] serial: sc16is7xx: add support for rs485 RTS delays in microseconds Martin Kepplinger
2019-02-20 15:31 ` Martin Kepplinger
2019-02-20 15:31 ` Martin Kepplinger
2019-02-20 15:31 ` Martin Kepplinger [this message]
2019-02-20 15:31   ` [PATCH 7/9] serial: atmel_serial: set SER_RS485_DELAY_IN_USEC accordingly Martin Kepplinger
2019-02-20 15:31   ` Martin Kepplinger
2019-02-20 15:31 ` [PATCH 8/9] serial: fsl_lpuart: " Martin Kepplinger
2019-02-20 15:31   ` Martin Kepplinger
2019-02-20 15:31   ` Martin Kepplinger
2019-02-20 15:31 ` [PATCH 9/9] serial: st32-usart: " Martin Kepplinger
2019-02-20 15:31   ` Martin Kepplinger
2019-02-20 15:31   ` Martin Kepplinger

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=20190220153119.4423-2-martin.kepplinger@ginzinger.com \
    --to=martin.kepplinger@ginzinger.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@st.com \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=ludovic.desroches@microchip.com \
    --cc=mark.rutland@arm.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=richard.genoud@gmail.com \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.