From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: linux-serial@vger.kernel.org,
Greg KH <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-kernel@vger.kernel.org
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH v2 3/6] serial: Use bits for UART_LSR_BRK_ERROR_BITS/MSR_ANY_DELTA
Date: Tue, 21 Jun 2022 15:49:55 +0300 [thread overview]
Message-ID: <20220621124958.3342-4-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20220621124958.3342-1-ilpo.jarvinen@linux.intel.com>
Instead of listing the bits for UART_LSR_BRK_ERROR_BITS and
UART_MSR_ANY_DELTA in comment, use them to define instead.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
include/uapi/linux/serial_reg.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/serial_reg.h b/include/uapi/linux/serial_reg.h
index f51bc8f36813..bab3b39266cc 100644
--- a/include/uapi/linux/serial_reg.h
+++ b/include/uapi/linux/serial_reg.h
@@ -139,7 +139,7 @@
#define UART_LSR_PE 0x04 /* Parity error indicator */
#define UART_LSR_OE 0x02 /* Overrun error indicator */
#define UART_LSR_DR 0x01 /* Receiver data ready */
-#define UART_LSR_BRK_ERROR_BITS 0x1E /* BI, FE, PE, OE bits */
+#define UART_LSR_BRK_ERROR_BITS (UART_LSR_BI|UART_LSR_FE|UART_LSR_PE|UART_LSR_OE)
#define UART_MSR 6 /* In: Modem Status Register */
#define UART_MSR_DCD 0x80 /* Data Carrier Detect */
@@ -150,7 +150,7 @@
#define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */
#define UART_MSR_DDSR 0x02 /* Delta DSR */
#define UART_MSR_DCTS 0x01 /* Delta CTS */
-#define UART_MSR_ANY_DELTA 0x0F /* Any of the delta bits! */
+#define UART_MSR_ANY_DELTA (UART_MSR_DDCD|UART_MSR_TERI|UART_MSR_DDSR|UART_MSR_DCTS)
#define UART_SCR 7 /* I/O: Scratch Register */
--
2.30.2
next prev parent reply other threads:[~2022-06-21 12:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 12:49 [PATCH v2 0/6] serial: A few cleanups Ilpo Järvinen
2022-06-21 12:49 ` [PATCH v2 1/6] serial: msm: Convert container_of UART_TO_MSM to static inline Ilpo Järvinen
2022-06-23 6:24 ` Jiri Slaby
2022-06-21 12:49 ` [PATCH v2 2/6] serial: msm: Rename UART_* defines to MSM_UART_* Ilpo Järvinen
2022-06-23 7:26 ` Jiri Slaby
2022-06-21 12:49 ` Ilpo Järvinen [this message]
2022-06-23 7:26 ` [PATCH v2 3/6] serial: Use bits for UART_LSR_BRK_ERROR_BITS/MSR_ANY_DELTA Jiri Slaby
2022-06-21 12:49 ` [PATCH v2 4/6] serial: 8250: Use C99 array initializer & define UART_REG_UNMAPPED Ilpo Järvinen
2022-06-23 7:27 ` Jiri Slaby
2022-06-21 12:49 ` [PATCH v2 5/6] serial: Use UART_XMIT_SIZE Ilpo Järvinen
2022-06-21 12:49 ` Ilpo Järvinen
2022-06-21 12:49 ` Ilpo Järvinen
2022-06-23 7:30 ` Jiri Slaby
2022-06-23 7:30 ` Jiri Slaby
2022-06-23 7:30 ` Jiri Slaby
2022-06-24 20:00 ` Ilpo Järvinen
2022-06-24 20:00 ` Ilpo Järvinen
2022-06-24 20:00 ` Ilpo Järvinen
2022-06-21 12:49 ` [PATCH v2 6/6] serial: Consolidate BOTH_EMPTY use Ilpo Järvinen
2022-06-23 7:41 ` Jiri Slaby
[not found] ` <CAHp75VeKhY6dN7j_yXQXUMhOqRwqQ2yN_qF95U9wU6K4uKPdaQ@mail.gmail.com>
2022-06-23 8:24 ` Jiri Slaby
2022-06-23 10:15 ` Andy Shevchenko
2022-06-23 10:17 ` Andy Shevchenko
2022-07-04 6:59 ` Jiri Slaby
2022-06-24 21:09 ` Ilpo Järvinen
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=20220621124958.3342-4-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.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.