<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/spi, branch v2.6.26</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.26</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-07-04T17:40:08Z</updated>
<entry>
<title>spi: fix the read path in spidev</title>
<updated>2008-07-04T17:40:08Z</updated>
<author>
<name>Sebastian Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2008-07-04T16:59:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4b1295b0df28cffd40e6c6d7c4b88dec7af1eb76'/>
<id>urn:sha1:4b1295b0df28cffd40e6c6d7c4b88dec7af1eb76</id>
<content type='text'>
This got broken by the recent "fix rmmod $spi_driver while spidev-user is
active".  I tested the rmmod &amp; write path but didn't check the read path.
I am sorry.  The read logic changed and spidev_sync_read() +
spidev_sync_write() do not return zero on success anymore but the number
of bytes that has been transfered over the bus.  This patch changes the
logic and copy_to_user() gets called again.

The write path returns the number of bytes which are written to the
underlying device what may be less than the requested size.  This patch
makes the same change to the read path or else we request a read of 20
bytes, get 10, don't call copy to user and report to the user that we read
10 bytes.

[akpm@linux-foundation.org: remove test of known-to-be-zero local]
Signed-off-by: Sebastian Siewior &lt;bigeasy@linutronix.de&gt;
Acked-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>spi: fix refcount-related spidev oops-on-rmmod</title>
<updated>2008-06-06T18:29:08Z</updated>
<author>
<name>David Brownell</name>
<email>dbrownell@users.sourceforge.net</email>
</author>
<published>2008-06-06T05:45:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2c8daddcbe03a22402ecf943bb88302601c6835'/>
<id>urn:sha1:b2c8daddcbe03a22402ecf943bb88302601c6835</id>
<content type='text'>
This addresses other oopsing paths in "spidev" by changing how it manages
refcounting.  It decouples the lifecycle of the per-device data from the
class device (not just the spi device):

  - Use class_{create,destroy} not class_{register,unregister}.
  - Use device_{create,destroy} not device_{register,unregister}.
  - Free the per-device data only when TWO conditions are true:
      * Driver is unbound from underlying SPI device, and
      * Device is no longer open (new)

Also, spi_{get,set}_drvdata not dev_{get,set}_drvdata for simpler code.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Sebastian Siewior &lt;bigeasy@tglx.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>spi: remove some spidev oops-on-rmmod paths</title>
<updated>2008-05-24T16:56:14Z</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2008-05-23T20:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=25d5cb4b0375e5864ec0ccf35e12ff1d1b5cf3f0'/>
<id>urn:sha1:25d5cb4b0375e5864ec0ccf35e12ff1d1b5cf3f0</id>
<content type='text'>
Somehow the spidev code forgot to include a critical mechanism: when the
underlying device is removed (e.g.  spi_master rmmod), open file
descriptors must be prevented from issuing new I/O requests to that
device.  On penalty of the oopsing reported by Sebastian Siewior
&lt;bigeasy@tglx.de&gt; ...

This is a partial fix, adding handshaking between the lower level (SPI
messaging) and the file operations using the spi_dev.  (It also fixes an
issue where reads and writes didn't return the number of bytes sent or
received.)

There's still a refcounting issue to be addressed (separately).

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Reported-by: Sebastian Siewior &lt;bigeasy@tglx.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mpc5200_psc_spi: typo fix in header block</title>
<updated>2008-05-15T02:11:12Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2008-05-14T23:05:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57cc097931e2d28a27e19515c549dc301ba6b6b2'/>
<id>urn:sha1:57cc097931e2d28a27e19515c549dc301ba6b6b2</id>
<content type='text'>
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>spi_mpc83xx: much improved driver</title>
<updated>2008-05-13T15:02:25Z</updated>
<author>
<name>Joakim Tjernlund</name>
<email>Joakim.Tjernlund@transmode.se</email>
</author>
<published>2008-05-12T21:02:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9bfcb3151040cff6714542d1da04ccd7e2d3efc'/>
<id>urn:sha1:c9bfcb3151040cff6714542d1da04ccd7e2d3efc</id>
<content type='text'>
The current driver may cause glitches on SPI CLK line since one must disable
the SPI controller before changing any HW settings.  Fix this by implementing
a local spi_transfer function that won't change speed and/or word size while
CS is active.

While doing that heavy lifting a few other issues were addressed too:
 - Make word size 16 and 32 work too.
 - Honor bits_per_word and speed_hz in spi transaction.
 - Optimize the common path.

This also stops using the "bitbang" framework (except for a few constants).

[Roel Kluin &lt;12o3l@tiscali.nl&gt;: "irq" needs to be signed]
Signed-off-by: Joakim Tjernlund &lt;Joakim.Tjernlund@transmode.se&gt;
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>spi: pxa2xx_spi clock resume bugfix</title>
<updated>2008-05-13T15:02:23Z</updated>
<author>
<name>Eric BENARD</name>
<email>ebenard@free.fr</email>
</author>
<published>2008-05-12T21:02:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0cf942d75a6acfa11a41f63330d8780901eda4af'/>
<id>urn:sha1:0cf942d75a6acfa11a41f63330d8780901eda4af</id>
<content type='text'>
There is a typo in pxa2xx_spi.c, comment says "Enable the SSP clock", code
says: clk_disable ...  so after resume, the SSP is dead.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Ned Forrester &lt;nforrester@whoi.edu&gt;
Cc: Stephen Street &lt;stephen@streetfiresound.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>spi_s3c24xx signedness fix</title>
<updated>2008-05-01T15:04:01Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2008-05-01T11:35:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d34aa4d5a3e5d141bb4d07ed5d4bf02d4d4998a'/>
<id>urn:sha1:0d34aa4d5a3e5d141bb4d07ed5d4bf02d4d4998a</id>
<content type='text'>
On Fri, Apr 18, 2008 at 09:08:55PM +0200, Julia Lawall wrote:
&gt; I found 63 occurrences of this problem with the following semantic match
&gt; (http://www.emn.fr/x-info/coccinelle/):
&gt;
&gt; @@ unsigned int i; @@
&gt;
&gt; * i &lt; 0
&gt;

Since this one's always in the range 0-255, it could probably be made
signed, but it's just as easy to make it work unsigned.

Reported-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>spi_bfin5xx: use PIO for full duplex, not DMA</title>
<updated>2008-05-01T15:04:01Z</updated>
<author>
<name>Vitja Makarov</name>
<email>vitja.makarov@gmail.com</email>
</author>
<published>2008-05-01T11:35:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8eeb12e5a2486ab958fa27ec97e71dabf234b73b'/>
<id>urn:sha1:8eeb12e5a2486ab958fa27ec97e71dabf234b73b</id>
<content type='text'>
Use PIO for full-duplex transfers, instead of DMA.

Signed-off-by: Vitja Makarov &lt;vitja.makarov@gmail.com&gt;
Signed-off-by: Bryan Wu &lt;cooloney@kernel.org&gt;
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>atmel_spi: clean up baud rate divisor calculation</title>
<updated>2008-04-30T15:29:31Z</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>haavard.skinnemoen@atmel.com</email>
</author>
<published>2008-04-30T07:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=592e7bf80566bf5ac3ed073d4e198dd5b0824c04'/>
<id>urn:sha1:592e7bf80566bf5ac3ed073d4e198dd5b0824c04</id>
<content type='text'>
Make the baud rate divisor calculation code a bit more readable and add a
few comments.

Also fix wrong debug information being displayed when !new_1 and
max_speed_hz == 0.

[david-b@pacbell.net: fix it]
Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
Cc: "Janesh Ramakrishnan" &lt;jramakrishnan@neuropace.com&gt;
Acked-by David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>spi: spi_imx updates</title>
<updated>2008-04-28T15:58:31Z</updated>
<author>
<name>Andrea Paterniani</name>
<email>a.paterniani@swapp-eng.it</email>
</author>
<published>2008-04-28T09:14:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d9f3f6b7c4c9fe1706006f24f964e7c0fa49fb7'/>
<id>urn:sha1:5d9f3f6b7c4c9fe1706006f24f964e7c0fa49fb7</id>
<content type='text'>
Updates to the i.MX SPI controller driver:

 1) Some comments changed and/or added.

 2) End of transfers is now managed on TXFIFO empty interrupt after the
    last write to TXFIFO.  This speeds interrupt execution by removing
    the wait for TXFIFO to become empty.  On TXFIFO empty interrupt the
    handler needs only to poll for the end of the ongoing transaction
    (SPI_CONTROL_XCH) to close the transfer.
     (2.1) Write only transfers are closed flushing RXFIFO.
     (2.2) Read transfers are closed reading trailing bytes from RXFIFO.
     (2.3) Read transfers where RXFIFO overrun occurred are closed by
           flushing RXFIFO and aborting the message.

 3) Fifos are now flushed via SPI disable after the end of ongoing
    transaction.

Signed-off-by: Andrea Paterniani &lt;a.paterniani@swapp-eng.it&gt;
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
