Subject: [PATCH v7] spi: Add PPC4xx SPI driver

Steven A. Falco sfalco at harris.com
Sat Jun 27 02:17:34 EST 2009


David Brownell wrote:
> On Thursday 25 June 2009, Steven A. Falco wrote:
>> +       if (spi->mode & ~MODEBITS) {
>> +               dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
>> +                       spi->mode & ~MODEBITS);
>> +               return -EINVAL;
>> +       }
> 
> This wasn't tested against 2.6.30-rc1 was it?
> 

I tested against Ben's "next" branch, plus your fix for bitbang_work.
But the new version I'll post is tested against Linus' master branch
(2.6.31-rc1) to take advantage of your mode_bits addition.  If you need
this driver to be based on something else, please say so.

> See the recent fixup patch I sent.  There's a spi_master->modebits
> mask that should have been initialized, and which eliminates the
> need for tests like that ...
> 

Done.

>> +       dev_dbg(&spi->dev, "%s: mode %d, %u bpw, %d hz\n",
>> +               __func__, spi->mode, spi->bits_per_word,
>> +               spi->max_speed_hz);
>> +
> 
> ... also the SPI core now provides a *standard* format debug
> message for that stuff.  It also handles one more thing, which
> I expect to see fixed in a v8 of this patch ...  :) 

Ok - I removed that dev_dbg().  Also, I noticed that spi_setup sets
bits_per_word to 8, so I've removed that as well.  Did I pass your
test?  :-) 

Version 8 will follow shortly.  BTW, this driver is dependent on your
bitbang_work fix.  Not sure if that means it should be added via your
tree.  But since we are in an rc phase, I'm guessing this won't merge
until 2.6.32, by which time your fix should be in the mainline.

	Steve


More information about the Linuxppc-dev mailing list