linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erwin Authried <eauth@softsys.co.at>
To: Feng Tang <feng.tang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Greg KH <greg@kroah.com>, David Brownell <david-b@pacbell.net>,
	Grant Likely <grant.likely@secretlab.ca>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	spi-devel-list <spi-devel-general@lists.sourceforge.net>,
	linux-serial@vger.kernel.org
Subject: Re: [spi-devel-general] [PATCH v6] serial: spi: add spi-uart driver for Maxim 3110
Date: Fri, 05 Mar 2010 08:44:50 +0100	[thread overview]
Message-ID: <1267775090.1941.31.camel@affe> (raw)
In-Reply-To: <20100304152524.56055828@feng-i7>

Am Donnerstag, den 04.03.2010, 15:25 +0800 schrieb Feng Tang:
> Hi All,
> 
> Here is a driver for Maxim 3110 SPI-UART device, please help to review.
> 
> It has been validated with Designware SPI controller (drivers/spi: dw_spi.c &
> dw_spi_pci.c). It supports polling and IRQ mode, supports batch read, and
> provides a console.
> 
> change log:
>  since v5:
>         * Make the spi data buffer DMA safe, thanks to Mssakazu Mokuno, 
>           David Brownell and Grant Likely for pointing the bug out
>  since v4:
>         * Add explanation why not using DMA
>         * Fix a bug in max3110_read_multi()
>  since v3:
>         * Remove the Designware controller related stuff
>         * Remove some initialization code which should be done in the platform
>           setup code
>         * Add a missing change for drivers/serial/Makefile
>  since v2:
>         * Address comments from Andrew Morton
>         * Use test/set_bit to avoid race condition for SMP/preempt case
>         * Fix bug related with endian order
>  since v1:
>         * Address comments from Alan Cox
>         * Use a "use_irq" module parameter to runtime check whether
>           to use IRQ mode
>         * Add the suspend/resume implementation
> 
> Thanks!
> Feng

Hi,

the only thing that I still don't like is the way of sending characters.
Basically, the spi rate is set to the actual baud rate when characters
are transmitted to the uart, and multiple characters are sent without
looking at the status of the uart.

The spi rate and the uart clock aren't synchronized, what happens if the
spi rate is slightly higher than the MAX3100's baud rate clock?
In addition, if there are other devices on the spi bus, the bus will be
occupied unnecessarily long, especially when low baudrates are used.

One other small cosmetic thing:
in serial_m3110_tx_empty(), TIOCSER_TEMT should be returned instead of
1.

-Erwin




  parent reply	other threads:[~2010-03-05  8:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04  7:25 [PATCH v6] serial: spi: add spi-uart driver for Maxim 3110 Feng Tang
2010-03-04 18:46 ` Masakazu Mokuno
2010-03-05  3:48   ` Feng Tang
2010-03-05  7:44 ` Erwin Authried [this message]
2010-03-08  2:11   ` [spi-devel-general] " Feng Tang
2010-03-08  4:12     ` Grant Likely
     [not found]       ` <fa686aa41003072012q51c57f7fidbc1b62b91969832-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-03-11  9:07         ` Feng Tang
2010-03-08  4:30 ` Grant Likely
2010-03-11  8:32   ` Feng Tang
  -- strict thread matches above, loose matches on Subject: below --
2010-03-16 17:22 christian pellegrin
2010-03-17  2:35 ` Feng Tang
2010-03-17  7:39   ` christian pellegrin
2010-03-17  8:17     ` [spi-devel-general] " Erwin Authried

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=1267775090.1941.31.camel@affe \
    --to=eauth@softsys.co.at \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=david-b@pacbell.net \
    --cc=feng.tang@intel.com \
    --cc=grant.likely@secretlab.ca \
    --cc=greg@kroah.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).