From: David Brownell <david-b@pacbell.net>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: "'LKML'" <linux-kernel@vger.kernel.org>,
spi-devel-general@lists.sourceforge.net,
kyungmin.park@samsung.com
Subject: Re: [PATCH] [drivers] [SPI] SPI_GPIO: add support for controllers without MISO or MOSI pin
Date: Tue, 30 Jun 2009 18:39:13 -0700 [thread overview]
Message-ID: <200906301839.13764.david-b@pacbell.net> (raw)
In-Reply-To: <000a01c9f61f$fd7ff3d0$f87fdb70$%szyprowski@samsung.com>
On Thursday 25 June 2009, Marek Szyprowski wrote:
> --- a/drivers/spi/spi_bitbang.c
> +++ b/drivers/spi/spi_bitbang.c
> @@ -392,6 +392,22 @@ int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m)
> unsigned long flags;
> int status = 0;
>
> + if (spi->master->flags & SPI_MASTER_NO_RX) {
> + struct spi_transfer *xfer;
> + list_for_each_entry(xfer, &m->transfers, transfer_list) {
> + if (xfer->rx_buf)
> + return -EINVAL;
> + }
> + }
Actually these two loops should merge, and likely move with
spi_async() into the spi.c core code ... I'll split this
support into a separate patch.
> +
> + if (spi->master->flags & SPI_MASTER_NO_TX) {
> + struct spi_transfer *xfer;
> + list_for_each_entry(xfer, &m->transfers, transfer_list) {
> + if (xfer->tx_buf)
> + return -EINVAL;
> + }
> + }
> +
> m->actual_length = 0;
> m->status = -EINPROGRESS;
>
next prev parent reply other threads:[~2009-07-01 1:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 5:35 Marek Szyprowski
2009-07-01 1:39 ` David Brownell [this message]
2009-07-01 6:57 ` Marek Szyprowski
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=200906301839.13764.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--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
all inboxes | Powered by JetHome®