[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200701250502.56467.david-b@pacbell.net>
Date: Thu, 25 Jan 2007 05:02:56 -0800
From: David Brownell <david-b@...bell.net>
To: "Hans-Peter Nilsson" <hans-peter.nilsson@...s.com>
Cc: linux-kernel@...r.kernel.org, mikael.starvik@...s.com,
spi-devel-general@...ts.sourceforge.net
Subject: Re: [PATCH] 3/5: Updates to SPI and mmc_spi: tx_default, kernel 2.6.19
On Wednesday 24 January 2007 8:52 pm, Hans-Peter Nilsson wrote:
> (Please CC me on replies, I'm not subscribed to LKML or the SPI list. Thanks.)
>
> The SD/MMC SPI-based protocol isn't really duplex. In the
> normal case there's either information transmitted or received,
> not both simultaneously. The unused data is always 0xff; ones.
> Unfortunately, the SPI framework leaves outgoing data for a
> left-out tx_buf just as "undefined"
In current kernels that's actually changed. The value to be shifted
out is now specified ... as all-zeroes, which is what various chips
need to receive, and various (half-duplex/Microwire) controllers seem
to be doing in any case.
If that's an issue -- and MMC-over-SPI needs to specify some other
value -- then please re-issue this patch against 2.6.20, including
the update to the bitbang driver ("reference implementation").
I think a better way to package this would be to define a new
flag for spi->mode, since controller drivers are already supposed
to be checking that to make sure they handle all the options which
have been specified. That flag could work in conjunction with
a byte provided in the spi_device, that would be used instead of
zero. (Some folk have noted that when debugging, it's easier if
the pattern there is neither all-ones nor all-zeroes ... something
that a digital scope will show is easier to work with.)
- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists