From: Greg KH <gregkh@linuxfoundation.org>
To: Matthew Howell <matthew.howell@sealevel.com>
Cc: jeff.baldwin@sealevel.com, james.olson@sealevel.com,
ryan.wenglarz@sealevel.com, darren.beeson@sealevel.com,
linux-serial@vger.kernel.org, andriy.shevchenko@intel.com,
ilpo.jarvinen@linux.intel.com
Subject: Re: [PATCH V6 2/2] serial: exar: Add RS-485 support for Sealevel XR17V35X based cards
Date: Mon, 18 Sep 2023 09:33:43 +0200 [thread overview]
Message-ID: <2023091853-reattach-dealmaker-ebb8@gregkh> (raw)
In-Reply-To: <1cfeb276-788b-5d21-5af9-8948c9273183@sealevel.com>
On Thu, Sep 14, 2023 at 04:52:21PM -0400, Matthew Howell wrote:
> From: Matthew Howell <matthew.howell@sealevel.com>
>
> Sealevel XR17V35X based cards utilize DTR to control RS-485 Enable, but
> the current implementation of 8250_exar uses RTS for the
> auto-RS485-Enable mode of the XR17V35X UARTs. This patch implements DTR
> Auto-RS485 on Sealevel cards.
You have trailing whitespace in your commit log :(
Please fix your editor to not do this.
> Link: https://lore.kernel.org/all/24b88a50-9c53-82ba-84d1-292c74c81981@sealevel.com/T/
This is not needed, don't link to older emails, that can be done on a
0/X message if you really want one.
> Signed-off-by: Matthew Howell <matthew.howell@sealevel.com>
> ---
> V5->V6
> Split ret in sealevel_rs485_config
> V4->V5
> Fixed typo in commit message
> Split readb and writeb into multiple lines/variables
> Removed "store original LCR" since it was clear from code
> Various small fixes to tabs and whitespace
>
> diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
> index 3886f78ecbbf..34f0e18c7ad8 100644
> --- a/drivers/tty/serial/8250/8250_exar.c
> +++ b/drivers/tty/serial/8250/8250_exar.c
> @@ -78,6 +78,9 @@
>
> #define UART_EXAR_RS485_DLY(x) ((x) << 4)
>
> +#define UART_EXAR_DLD 0x02 /* Divisor Fractional */
> +#define UART_EXAR_DLD_485_POLARITY 0x80 /* RS-485 Enable Signal Polarity */
Why are these values not lined up?
> /*
> * IOT2040 MPIO wiring semantics:
> *
> @@ -439,6 +442,41 @@ static int generic_rs485_config(struct uart_port *port, struct ktermios *termios
> return 0;
> }
>
> +static int sealevel_rs485_config(struct uart_port *port, struct ktermios *termios,
> + struct serial_rs485 *rs485)
> +{
> + u8 __iomem *p = port->membase;
> + u8 old_lcr;
> + u8 efr;
> + u8 dld;
> +
> + generic_rs485_config(port, termios, rs485);
Shouldn't you check the return value of this function?
Yes, today it can't fail, but you don't know that will really be the
case, so please fix this.
thanks,
greg k-h
next prev parent reply other threads:[~2023-09-18 7:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 20:52 [PATCH V6 2/2] serial: exar: Add RS-485 support for Sealevel XR17V35X based cards Matthew Howell
2023-09-18 7:33 ` Greg KH [this message]
2023-09-18 15:01 ` Matthew Howell
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=2023091853-reattach-dealmaker-ebb8@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@intel.com \
--cc=darren.beeson@sealevel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=james.olson@sealevel.com \
--cc=jeff.baldwin@sealevel.com \
--cc=linux-serial@vger.kernel.org \
--cc=matthew.howell@sealevel.com \
--cc=ryan.wenglarz@sealevel.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