linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shijie8@gmail.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V1 4/5] spi: Add Freescale QuadSpi driver
Date: Sat, 24 Aug 2013 09:42:03 -0400	[thread overview]
Message-ID: <20130824134201.GA7572@gmail.com> (raw)
In-Reply-To: <20130823164442.GA30359@sirena.org.uk>

On Fri, Aug 23, 2013 at 05:44:42PM +0100, Mark Brown wrote:
> On Mon, Aug 19, 2013 at 12:10:02PM +0800, Huang Shijie wrote:
> 
> > +static int fsl_qspi_nor_do_one_msg(struct spi_master *master,
> > +		struct spi_message *m)
> > +{
> > +	struct fsl_qspi *q = spi_master_get_devdata(master);
> > +	struct spi_transfer *t;
> > +	int ret = 0;
> > +
> > +	list_for_each_entry(t, &m->transfers, transfer_list) {
> > +		if (t->rx_buf && t->tx_buf) {
> > +			dev_err(q->dev,
> > +				"Can't send and receive simultaneously\n");
> > +			ret = -EINVAL;
> > +			break;
> > +		}
> > +
> > +		if (t->tx_buf) {
> > +			ret = fsl_qspi_nor_tx(q, t);
> > +			if (!ret)
> > +				m->actual_length += t->len;
> > +			continue;
> > +		}
> > +
> > +		if (t->rx_buf) {
> > +			ret = fsl_qspi_nor_rx(q, t);
> > +			if (!ret)
> > +				m->actual_length += t->len;
> > +		}
> > +	}
> 
> The driver should flag SPI_HALF_DUPLEX since it doesn't support
> simultaneous RX and TX.
> 
okay, i will add the flag in the next version.


thanks
Huang Shijie

  parent reply	other threads:[~2013-08-24 13:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19  4:09 [PATCH V1 0/5] Add the Quadspi driver for vf610-twr Huang Shijie
2013-08-19  4:09 ` [PATCH V1 1/5] mtd: m25p80: move the spi-nor commands to a header Huang Shijie
2013-08-19  4:10 ` [PATCH V1 2/5] mtd: m25p80: add support for Spansion s25fl128s chip Huang Shijie
2013-08-19  4:10 ` [PATCH V1 3/5] mtd: m25p80: add the quad-read support Huang Shijie
2013-08-22 19:34   ` Brian Norris
2013-08-22 19:55     ` Mark Brown
2013-08-22 20:29       ` Marek Vasut
2013-08-22 23:36         ` Mark Brown
2013-08-22 23:58           ` Marek Vasut
2013-08-23  9:41             ` Mark Brown
2013-08-23 10:42               ` Marek Vasut
2013-08-23 11:46               ` Brian Norris
2013-08-23 11:53                 ` Brian Norris
2013-08-23 12:01                   ` Mark Brown
2013-08-23 13:20                   ` yuhang wang
2013-08-23  6:26       ` Huang Shijie
2013-08-23 11:23       ` Brian Norris
2013-08-23 11:27         ` Sourav Poddar
2013-08-23 11:30         ` Mark Brown
2013-08-23  9:05   ` yuhang wang
2013-08-23  9:25     ` Huang Shijie
2013-08-23  9:57       ` Sourav Poddar
2013-08-24  2:45         ` Huang Shijie
2013-08-23 15:59           ` Sourav Poddar
2013-08-23 13:59       ` yuhang wang
2013-08-24  3:01         ` Huang Shijie
2013-08-19  4:10 ` [PATCH V1 4/5] spi: Add Freescale QuadSpi driver Huang Shijie
2013-08-22 19:21   ` Brian Norris
2013-08-23  2:14     ` Huang Shijie
2013-08-23  6:59     ` Huang Shijie
2013-08-23 16:44   ` Mark Brown
2013-08-24  7:11     ` Brian Norris
2013-08-24 13:42     ` Huang Shijie [this message]
2013-08-19  4:10 ` [PATCH V1 5/5] ARM: dts: vf610-twr: Add SPI NOR support Huang Shijie

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=20130824134201.GA7572@gmail.com \
    --to=shijie8@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).