All of lore.kernel.org
 help / color / mirror / Atom feed
From: "andriy.shevchenko@intel.com" <andriy.shevchenko@intel.com>
To: Matthew Howell <matthew.howell@sealevel.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	Darren Beeson <darren.beeson@sealevel.com>,
	Jeff Baldwin <jeff.baldwin@sealevel.com>,
	"ilpo.jarvinen@linux.intel.com" <ilpo.jarvinen@linux.intel.com>,
	Ryan Wenglarz <ryan.wenglarz@sealevel.com>,
	James Olson <james.olson@sealevel.com>
Subject: Re: [PATCH V8 2/2] serial: exar: Add RS-485 support for Sealevel XR17V35X based cards
Date: Fri, 22 Sep 2023 17:48:33 +0300	[thread overview]
Message-ID: <ZQ2pQS4q31t8aMBB@smile.fi.intel.com> (raw)
In-Reply-To: <4c6c4e3212a929822ec6a8ba09691b465541f648.camel@sealevel.com>

Bingo, you have threaded emails!

On Fri, Sep 22, 2023 at 02:22:11PM +0000, 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.

Btw, few ideas for further improvements / questions.

...

> +static int pci_sealevel_setup(struct exar8250 *priv, struct pci_dev *pcidev,
> +		   struct uart_8250_port *port, int idx)
> +{
> +	int ret;
> +
> +	ret = pci_xr17v35x_setup(priv, pcidev, port, idx);
> +	if (ret)
> +		return ret;
> +
> +	port->port.rs485_config = sealevel_rs485_config;
> +
> +	return 0;
> +}

This actually can be embedded into original pci_xr17v35x_setup() as

	if (pdev->subsystem_vendor == PCI_VENDOR_ID_SEALEVEL)
		port->port.rs485_config = sealevel_rs485_config;

...

> +	SEALEVEL_DEVICE(XR17V4358, pbn_sealevel_16),

This is kinda worries me. Original Exar card has12 port, why 16 is in use for this one?

> +	SEALEVEL_DEVICE(XR17V8358, pbn_sealevel_16),

With the above suggestion this will be fixed automatically.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-09-22 14:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 14:20 [PATCH V8 1/2] serial: exar: Revert "serial: exar: Add support for Sealevel 7xxxC serial cards" Matthew Howell
2023-09-22 14:22 ` [PATCH V8 2/2] serial: exar: Add RS-485 support for Sealevel XR17V35X based cards Matthew Howell
2023-09-22 14:48   ` andriy.shevchenko [this message]
2023-09-22 15:33     ` Matthew Howell
2023-09-25  8:40       ` andriy.shevchenko
2023-09-22 14:46 ` [PATCH V8 1/2] serial: exar: Revert "serial: exar: Add support for Sealevel 7xxxC serial cards" andriy.shevchenko

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=ZQ2pQS4q31t8aMBB@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=darren.beeson@sealevel.com \
    --cc=gregkh@linuxfoundation.org \
    --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 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.