From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Parker Newman <parker@finest.io>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-serial <linux-serial@vger.kernel.org>,
Parker Newman <pnewman@connecttech.com>
Subject: Re: [PATCH v4 4/7] serial: exar: moved generic_rs485 further up in 8250_exar.c
Date: Thu, 18 Apr 2024 14:37:23 +0300 (EEST) [thread overview]
Message-ID: <88d1dde8-c32b-a5b2-3eaf-e133ec3c4e33@linux.intel.com> (raw)
In-Reply-To: <a7bf2a42de759908c058246ec15f60bde9a5dc65.1713382717.git.pnewman@connecttech.com>
[-- Attachment #1: Type: text/plain, Size: 3101 bytes --]
Hi,
In shortlog (Subject),
- moved -> move
- exar: -> 8250_exar:
After those, "in 8250_exar.c" is redundant information and can be removed.
> From: Parker Newman <pnewman@connecttech.com>
>
> Preparatory patch moving generic_rs485_config and
Use () when talking about functions.
After fixing those, feel free to add,
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
> generic_rs485_supported higher in the file to allow for CTI setup
> functions to use them.
>
> Signed-off-by: Parker Newman <pnewman@connecttech.com>
> ---
> Changes in v3:
> - split into separate preparatory patch
>
> drivers/tty/serial/8250/8250_exar.c | 50 ++++++++++++++---------------
> 1 file changed, 25 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
> index f14f73d250bb..e68029a59122 100644
> --- a/drivers/tty/serial/8250/8250_exar.c
> +++ b/drivers/tty/serial/8250/8250_exar.c
> @@ -197,6 +197,31 @@ struct exar8250 {
> int line[];
> };
>
> +static int generic_rs485_config(struct uart_port *port, struct ktermios *termios,
> + struct serial_rs485 *rs485)
> +{
> + bool is_rs485 = !!(rs485->flags & SER_RS485_ENABLED);
> + u8 __iomem *p = port->membase;
> + u8 value;
> +
> + value = readb(p + UART_EXAR_FCTR);
> + if (is_rs485)
> + value |= UART_FCTR_EXAR_485;
> + else
> + value &= ~UART_FCTR_EXAR_485;
> +
> + writeb(value, p + UART_EXAR_FCTR);
> +
> + if (is_rs485)
> + writeb(UART_EXAR_RS485_DLY(4), p + UART_MSR);
> +
> + return 0;
> +}
> +
> +static const struct serial_rs485 generic_rs485_supported = {
> + .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND,
> +};
> +
> static void exar_pm(struct uart_port *port, unsigned int state, unsigned int old)
> {
> /*
> @@ -459,27 +484,6 @@ static void xr17v35x_unregister_gpio(struct uart_8250_port *port)
> port->port.private_data = NULL;
> }
>
> -static int generic_rs485_config(struct uart_port *port, struct ktermios *termios,
> - struct serial_rs485 *rs485)
> -{
> - bool is_rs485 = !!(rs485->flags & SER_RS485_ENABLED);
> - u8 __iomem *p = port->membase;
> - u8 value;
> -
> - value = readb(p + UART_EXAR_FCTR);
> - if (is_rs485)
> - value |= UART_FCTR_EXAR_485;
> - else
> - value &= ~UART_FCTR_EXAR_485;
> -
> - writeb(value, p + UART_EXAR_FCTR);
> -
> - if (is_rs485)
> - writeb(UART_EXAR_RS485_DLY(4), p + UART_MSR);
> -
> - return 0;
> -}
> -
> static int sealevel_rs485_config(struct uart_port *port, struct ktermios *termios,
> struct serial_rs485 *rs485)
> {
> @@ -518,10 +522,6 @@ static int sealevel_rs485_config(struct uart_port *port, struct ktermios *termio
> return 0;
> }
>
> -static const struct serial_rs485 generic_rs485_supported = {
> - .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND,
> -};
> -
> static const struct exar8250_platform exar8250_default_platform = {
> .register_gpio = xr17v35x_register_gpio,
> .unregister_gpio = xr17v35x_unregister_gpio,
> --
> 2.43.2
>
>
next prev parent reply other threads:[~2024-04-18 11:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 20:31 [PATCH v4 0/7] serial: exar: add Connect Tech serial cards to Exar driver Parker Newman
2024-04-17 20:31 ` [PATCH v4 1/7] serial: exar: remove old Connect Tech setup Parker Newman
2024-04-17 20:31 ` [PATCH v4 2/7] serial: exar: added a exar_get_nr_ports function Parker Newman
2024-04-18 11:32 ` Ilpo Järvinen
2024-04-17 20:31 ` [PATCH v4 3/7] serial: exar: add optional board_init function Parker Newman
2024-04-18 11:32 ` Ilpo Järvinen
2024-04-17 20:31 ` [PATCH v4 4/7] serial: exar: moved generic_rs485 further up in 8250_exar.c Parker Newman
2024-04-18 11:37 ` Ilpo Järvinen [this message]
2024-04-17 20:31 ` [PATCH v4 5/7] serial: exar: add CTI cards to exar_get_nr_ports Parker Newman
2024-04-18 11:43 ` Ilpo Järvinen
2024-04-17 20:31 ` [PATCH v4 6/7] serial: exar: add CTI specific setup code Parker Newman
2024-04-18 5:29 ` kernel test robot
2024-04-18 5:42 ` Greg Kroah-Hartman
2024-04-18 13:20 ` Ilpo Järvinen
2024-04-18 14:21 ` Parker Newman
2024-04-18 16:29 ` Ilpo Järvinen
2024-04-18 17:03 ` Parker Newman
2024-04-18 17:25 ` Ilpo Järvinen
2024-04-17 20:31 ` [PATCH v4 7/7] serial: exar: fix checkpach warnings Parker Newman
2024-04-18 6:25 ` [PATCH v4 0/7] serial: exar: add Connect Tech serial cards to Exar driver Greg Kroah-Hartman
2024-04-18 12:40 ` Parker Newman
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=88d1dde8-c32b-a5b2-3eaf-e133ec3c4e33@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 \
--cc=parker@finest.io \
--cc=pnewman@connecttech.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox