From: Johan Hovold <johan@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 02/12] USB: serial: xr: rename GPIO-mode defines
Date: Tue, 30 Mar 2021 16:39:27 +0200 [thread overview]
Message-ID: <20210330143934.9197-3-johan@kernel.org> (raw)
In-Reply-To: <20210330143934.9197-1-johan@kernel.org>
Rename the GPIO mode defines so that they reflect the datasheet and how
they are used.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/xr_serial.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c
index 64bc9d7b948b..a600448c6016 100644
--- a/drivers/usb/serial/xr_serial.c
+++ b/drivers/usb/serial/xr_serial.c
@@ -88,11 +88,11 @@ struct xr_txrx_clk_mask {
#define XR21V141X_UART_FLOW_MODE_HW 0x1
#define XR21V141X_UART_FLOW_MODE_SW 0x2
-#define XR21V141X_UART_MODE_GPIO_MASK GENMASK(2, 0)
-#define XR21V141X_UART_MODE_RTS_CTS 0x1
-#define XR21V141X_UART_MODE_DTR_DSR 0x2
-#define XR21V141X_UART_MODE_RS485 0x3
-#define XR21V141X_UART_MODE_RS485_ADDR 0x4
+#define XR21V141X_GPIO_MODE_MASK GENMASK(2, 0)
+#define XR21V141X_GPIO_MODE_RTS_CTS 0x1
+#define XR21V141X_GPIO_MODE_DTR_DSR 0x2
+#define XR21V141X_GPIO_MODE_RS485 0x3
+#define XR21V141X_GPIO_MODE_RS485_ADDR 0x4
#define XR21V141X_REG_ENABLE 0x03
#define XR21V141X_REG_FORMAT 0x0b
@@ -433,11 +433,11 @@ static void xr_set_flow_mode(struct tty_struct *tty,
return;
/* Set GPIO mode for controlling the pins manually by default. */
- gpio_mode &= ~XR21V141X_UART_MODE_GPIO_MASK;
+ gpio_mode &= ~XR21V141X_GPIO_MODE_MASK;
if (C_CRTSCTS(tty) && C_BAUD(tty) != B0) {
dev_dbg(&port->dev, "Enabling hardware flow ctrl\n");
- gpio_mode |= XR21V141X_UART_MODE_RTS_CTS;
+ gpio_mode |= XR21V141X_GPIO_MODE_RTS_CTS;
flow = XR21V141X_UART_FLOW_MODE_HW;
} else if (I_IXON(tty)) {
u8 start_char = START_CHAR(tty);
--
2.26.3
next prev parent reply other threads:[~2021-03-30 14:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 14:39 [PATCH 00/12] USB: serial: xr: add support for more device types Johan Hovold
2021-03-30 14:39 ` [PATCH 01/12] USB: serial: xr: add support for XR21V1412 and XR21V1414 Johan Hovold
2021-03-30 14:39 ` Johan Hovold [this message]
2021-03-30 14:39 ` [PATCH 03/12] USB: serial: xr: rename GPIO-pin defines Johan Hovold
2021-03-30 14:39 ` [PATCH 04/12] USB: serial: xr: move pin configuration to probe Johan Hovold
2021-03-30 14:39 ` [PATCH 05/12] USB: serial: xr: drop type prefix from shared defines Johan Hovold
2021-03-30 14:39 ` [PATCH 06/12] USB: serial: xr: add type abstraction Johan Hovold
2021-03-30 14:39 ` [PATCH 07/12] USB: serial: xr: add support for XR21B1421, XR21B1422 and XR21B1424 Johan Hovold
2021-03-30 14:39 ` [PATCH 08/12] USB: serial: xr: add support for XR21B1411 Johan Hovold
2021-03-30 14:39 ` [PATCH 09/12] USB: serial: xr: add support for XR22801, XR22802, XR22804 Johan Hovold
2021-04-12 9:55 [PATCH RESEND 00/12] USB: serial: xr: add support for more device types Johan Hovold
2021-04-12 9:55 ` [PATCH 02/12] USB: serial: xr: rename GPIO-mode defines Johan Hovold
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=20210330143934.9197-3-johan@kernel.org \
--to=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab+huawei@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.