linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erwin Authried <eauth@softsys.co.at>
To: "Tang, Feng" <feng.tang@intel.com>
Cc: Baruch Siach <baruch@tkos.co.il>,
	David Brownell <dbrownell@users.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	spi-devel-list <spi-devel-general@lists.sourceforge.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	"alan@lxorguk.ukuu.org.uk" <alan@lxorguk.ukuu.org.uk>
Subject: Re: [spi-devel-general] [RFC][PATCH] serial: spi: add spi-uart driver for Maxim 3110
Date: Tue, 29 Dec 2009 19:43:48 +0100	[thread overview]
Message-ID: <1262112228.28396.93.camel@justakiss.home.at> (raw)
In-Reply-To: <73BDC2BA3DA0BD47BAAEE12383D407EF303E943D@shzsmsx502.ccr.corp.intel.com>

Am Mittwoch, den 30.12.2009, 00:05 +0800 schrieb Tang, Feng:
> >-----Original Message-----
> >From: Baruch Siach [mailto:baruch@tkos.co.il]
> >Sent: 2009年12月29日 23:00
> >To: Tang, Feng
> >Cc: Greg Kroah-Hartman; David Brownell; Grant Likely; spi-devel-list;
> >linux-serial@vger.kernel.org; alan@lxorguk.ukuu.org.uk; Andrew Morton
> >Subject: Re: [spi-devel-general] [RFC][PATCH] serial: spi: add spi-uart driver for
> >Maxim 3110
> >
> >Hi Feng,
> >
> >On Tue, Dec 29, 2009 at 10:20:06PM +0800, Feng Tang wrote:
> >> Here is a driver for Maxim 3110 SPI-UART device, please help to review.
> >
> >Is this 3110 device so significantly different from the MAX3100 driver that's
> >already in the mainline kernel (drivers/serial/max3100.c), to require a whole
> >new driver?
> 
> Yes, I know this question will be asked :) I developed the max3110 before max3100
> was posted in public, so the 2 designs differs a lot from the start. I think this driver
> has 2 good points:
> 1. It provides a console, which is the main reason that our platform use max3110
> 2. It utilizes the RX buffer of max3110 that it can reads up to 8 characters in one
> spi_transfer, and its Tx function can transmit up to 128 chars in one spi_transfer
> which will save much system load comparing to 1 char per spi transfer
> 
> Current max3100.c also has its advantage, like good support in CTS/RTS control,
> and I think these 2 can merge in the future.
> 
> Thanks,
> Feng 
> >
> >> 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.
> >
> >baruch
> >
> >--

Hi,

looking at your driver, there are several points that make me doubt that
it is working at all:

* The MAX3110 requires CS going low at the start of each 16-bit
transfer, if you look at the datasheet. 

* in max3110_read_multi, it looks to me that this will work for
big-endian architectures only.

* I can't see how send_circ_buf() should work at all. You are just
sending a burst of characters to the MAX3110 without checking the
transmit buffer status at all. The MAX3110 has a single TX buffer only,
so that will cause transmit characters to be lost.

I think there's no need for a MAX3100 **and** a MAX3110 driver, this is
just confusing. The MAX3110 driver is identical to the MAX3100 from the
software view, it is simply a MAX3100 with transceivers added to the
chip. If there's any improvement, that should be merged into the
existing MAX3100 driver.

-Erwin


--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-12-29 18:43 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091229222006.1ddb28a4@feng-desktop>
2009-12-29 14:59 ` [spi-devel-general] [RFC][PATCH] serial: spi: add spi-uart driver for Maxim 3110 Baruch Siach
2009-12-29 16:05   ` Tang, Feng
2009-12-29 18:43     ` Erwin Authried [this message]
2009-12-30  1:54       ` Feng Tang
2010-02-25  4:47       ` David Brownell
2010-02-25  7:49         ` Feng Tang
2009-12-29 15:02 ` Alan Cox
2010-02-08  8:59 ` [RFC][PATCH v2] " Feng Tang
     [not found] ` <20100208165946.0e4dde83@feng-i7>
2010-02-09  0:20   ` Andrew Morton
2010-02-09  0:26     ` Grant Likely
2010-02-09  1:36       ` Feng Tang
2010-02-17 22:58         ` Greg KH
2010-02-24  5:11           ` [RFC][PATCH v3] " Feng Tang
2010-02-24 10:44             ` Alan Cox
2010-02-24 14:25               ` Grant Likely
2010-02-24 23:18             ` Andrew Morton
2010-02-25  6:39               ` Feng Tang
2010-02-25  4:43             ` David Brownell
2010-02-25  7:44               ` Feng Tang
2010-02-25  8:11                 ` David Brownell
2010-02-26  3:47             ` [PATCH v4] " Feng Tang
     [not found]             ` <20100226114729.679bb933@feng-i7>
2010-02-26  9:59               ` Masakazu Mokuno
2010-02-26 19:41                 ` David Brownell
2010-03-01  2:30                   ` Feng Tang
2010-03-02  3:38                 ` Feng Tang
2010-02-09  9:25     ` [RFC][PATCH v2] " Alan Cox
2010-03-03  2:57   ` [PATCH v5] " Feng Tang
2010-03-03  3:59     ` Grant Likely
2010-03-03  4:51     ` David Brownell
2010-03-03  5:52       ` Feng Tang
2010-03-03  6:16         ` David Brownell
2010-03-03  6:37           ` Feng Tang
2010-03-03  7:25             ` David Brownell
2010-03-03  7:42               ` Feng Tang

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=1262112228.28396.93.camel@justakiss.home.at \
    --to=eauth@softsys.co.at \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=baruch@tkos.co.il \
    --cc=dbrownell@users.sourceforge.net \
    --cc=feng.tang@intel.com \
    --cc=gregkh@suse.de \
    --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).