<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/spi/spi.h, branch v3.10.42</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.10.42</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.10.42'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2013-05-13T14:27:18+00:00</updated>
<entry>
<title>Merge remote-tracking branch 'spi/fix/grant' into spi-linus</title>
<updated>2013-05-13T14:27:18+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2013-05-13T14:27:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88b0357dde1c2721a64268e4601d1c2dec1158b0'/>
<id>urn:sha1:88b0357dde1c2721a64268e4601d1c2dec1158b0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>spi: Initialize cs_gpio and cs_gpios with -ENOENT</title>
<updated>2013-04-07T09:12:20+00:00</updated>
<author>
<name>Andreas Larsson</name>
<email>andreas@gaisler.com</email>
</author>
<published>2013-02-13T13:20:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=446411e18b2cb17d153e45f634a3c9a79ada3ac2'/>
<id>urn:sha1:446411e18b2cb17d153e45f634a3c9a79ada3ac2</id>
<content type='text'>
The return value from of_get_named_gpio is -ENOENT when the given index
matches a hole in the "cs-gpios" property phandle list. However, the
default value of cs_gpio in struct spi_device and entries of cs_gpios in
struct spi_master is -EINVAL, which is documented to indicate that a
GPIO line should not be used for the given spi_device.

This sets the default value of cs_gpio in struct spi_device and entries
of cs_gpios in struct spi_master to -ENOENT. Thus, -ENOENT is the only
value used to indicate that no GPIO line should be used.

Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>spi: add ability to validate xfer-&gt;bits_per_word in SPI core</title>
<updated>2013-04-01T13:14:32+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@wwwdotorg.org</email>
</author>
<published>2013-03-27T02:37:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=543bb255a1987836e64f5b7a63664ead8b32b042'/>
<id>urn:sha1:543bb255a1987836e64f5b7a63664ead8b32b042</id>
<content type='text'>
Allow SPI masters to define the set of bits_per_word values they support.
If they do this, then the SPI core will reject transfers that attempt to
use an unsupported bits_per_word value. This eliminates the need for each
SPI driver to implement this checking in most cases.

Signed-off-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging</title>
<updated>2013-02-21T20:11:44+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-02-21T20:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5c78e04dd061b776978dad61dd85357081147b0'/>
<id>urn:sha1:b5c78e04dd061b776978dad61dd85357081147b0</id>
<content type='text'>
Pull staging tree update from Greg Kroah-Hartman:
 "Here's the big staging tree merge for 3.9-rc1

  Lots of cleanups and updates for drivers all through the staging tree.
  We are pretty much "code neutral" here, adding just about as many
  lines as we removed.

  All of these have been in linux-next for a while."

* tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (804 commits)
  staging: comedi: vmk80xx: wait for URBs to complete
  staging: comedi: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon
  staging: et131x: Update TODO list
  staging: et131x: Remove assignment of skb-&gt;dev
  staging: wlan-ng: hfa384x.h: fix for error reported by smatch
  staging/zache checkpatch ERROR: spaces prohibited around that
  staging/ozwpan: Mark read only parameters and structs as const
  staging/ozwpan: Remove empty and unused function oz_cdev_heartbeat
  staging/ozwpan: Mark local functions as static (fix sparse warnings)
  staging/ozwpan: Add missing header includes
  staging/usbip: Mark local functions as static (fix sparse warnings)
  staging/xgifb: Remove duplicated code in loops.
  staging/xgifb: Consolidate return paths
  staging/xgifb: Remove code without effect
  staging/xgifb: Remove unnecessary casts
  staging/xgifb: Consolidate if/else if with identical code branches
  staging: vt6656: replaced custom TRUE definition with true
  staging: vt6656: replaced custom FALSE definition with false
  staging: vt6656: replace custom BOOL definition with bool
  staging/rtl8187se: Mark functions as static to silence sparse
  ...
</content>
</entry>
<entry>
<title>spi: Document cs_gpios and cs_gpio in kernel-doc</title>
<updated>2013-02-11T00:05:31+00:00</updated>
<author>
<name>Andreas Larsson</name>
<email>andreas@gaisler.com</email>
</author>
<published>2013-01-29T14:53:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=095c3752e673c0ba039a2f67fd867297fde75ae7'/>
<id>urn:sha1:095c3752e673c0ba039a2f67fd867297fde75ae7</id>
<content type='text'>
This adds missing kernel-doc entries for cs_gpios in struct spi_master and
cs_gpio in struct spi_device.

Signed-off-by: Andreas Larsson &lt;andreas@gaisler.com&gt;
[grant.likely: tweaked the language of the descriptions]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>spi: Add helper functions for setting up transfers</title>
<updated>2013-02-09T11:02:07+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2013-01-09T17:31:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d9eecd418afb2c12e5db5be3d72f0f1df43bdd9'/>
<id>urn:sha1:6d9eecd418afb2c12e5db5be3d72f0f1df43bdd9</id>
<content type='text'>
Quite often the pattern used for setting up and transferring a synchronous SPI
transaction looks very much like the following:

	struct spi_message msg;
	struct spi_transfer xfers[] = {
		...
	};

	spi_message_init(&amp;msg);
	spi_message_add_tail(&amp;xfers[0], &amp;msg);
	...
	spi_message_add_tail(&amp;xfers[ARRAY_SIZE(xfers) - 1], &amp;msg);

	ret = spi_sync(&amp;msg);

This patch adds two new helper functions for handling this case. The first
helper function spi_message_init_with_transfers() takes a spi_message and an
array of spi_transfers. It will initialize the message and then call
spi_message_add_tail() for each transfer in the array. E.g. the following

	spi_message_init(&amp;msg);
	spi_message_add_tail(&amp;xfers[0], &amp;msg);
	...
	spi_message_add_tail(&amp;xfers[ARRAY_SIZE(xfers) - 1], &amp;msg);

can be rewritten as

	spi_message_init_with_transfers(&amp;msg, xfers, ARRAY_SIZE(xfers));

The second function spi_sync_transfer() takes a SPI device and an array of
spi_transfers. It will allocate a new spi_message (on the stack) and add all
transfers in the array to the message. Finally it will call spi_sync() on the
message.

E.g. the follwing

	struct spi_message msg;
	struct spi_transfer xfers[] = {
		...
	};

	spi_message_init(&amp;msg);
	spi_message_add_tail(&amp;xfers[0], &amp;msg);
	...
	spi_message_add_tail(&amp;xfers[ARRAY_SIZE(xfers) - 1], &amp;msg);

	ret = spi_sync(spi, &amp;msg);

can be rewritten as

	struct spi_transfer xfers[] = {
		...
	};

	ret = spi_sync_transfer(spi, xfers, ARRAY_SIZE(xfers));

A coccinelle script to find such instances will follow.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Reviewed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
<entry>
<title>of_spi: add generic binding support to specify cs gpio</title>
<updated>2012-11-21T23:25:33+00:00</updated>
<author>
<name>Jean-Christophe PLAGNIOL-VILLARD</name>
<email>plagnioj@jcrosoft.com</email>
</author>
<published>2012-11-15T19:19:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=743179849015dc71bb2ea63d8cd4bfa7fdfb4bc6'/>
<id>urn:sha1:743179849015dc71bb2ea63d8cd4bfa7fdfb4bc6</id>
<content type='text'>
This will allow to use gpio for chip select with no modification in the
driver binding

When use the cs-gpios, the gpio number will be passed via the cs_gpio field
and the number of chip select will automatically increased with max(hw cs, gpio cs).

So if for example the controller has 2 CS lines, and the cs-gpios
property looks like this:

cs-gpios = &lt;&amp;gpio1 0 0&gt; &lt;0&gt; &lt;&amp;gpio1 1 0&gt; &lt;&amp;gpio1 2 0&gt;;

Then it should be configured so that num_chipselect = 4 with the
following mapping:

cs0 : &amp;gpio1 0 0
cs1 : native
cs2 : &amp;gpio1 1 0
cs3 : &amp;gpio1 2 0

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD &lt;plagnioj@jcrosoft.com&gt;
Cc: devicetree-discuss@lists.ozlabs.org
Cc: spi-devel-general@lists.sourceforge.net
Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
[grant.likely: fixed up type of cs count so min() can do type checking]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>spi: fix spi.h kernel-doc warning</title>
<updated>2012-04-27T17:03:38+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2012-04-18T00:03:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dbabe0d659d3cfe42830a779909ab3cd42f7b027'/>
<id>urn:sha1:dbabe0d659d3cfe42830a779909ab3cd42f7b027</id>
<content type='text'>
Fix kernel-doc warning in spi.h (copy/paste):

Warning(include/linux/spi/spi.h:365): No description found for parameter 'unprepare_transfer_hardware'

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>spi: Trivial warning fix</title>
<updated>2012-03-09T17:56:10+00:00</updated>
<author>
<name>Shubhrajyoti D</name>
<email>shubhrajyoti@ti.com</email>
</author>
<published>2012-02-27T13:59:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f53602be555e500cfcd957955bb40fac19f2a6b'/>
<id>urn:sha1:8f53602be555e500cfcd957955bb40fac19f2a6b</id>
<content type='text'>
The loop count i traverses for ntrans which is unsigned
so make the loop count i also unsigned.

Fix the below warning
In file included from drivers/spi/spi-omap2-mcspi.c:38:
include/linux/spi/spi.h: In function 'spi_message_alloc':
include/linux/spi/spi.h:556: warning: comparison between signed and unsigned integer expressions

Cc: Vitaly Wool &lt;vwool@ru.mvista.com&gt;
Signed-off-by: Shubhrajyoti D &lt;shubhrajyoti@ti.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>spi: create a message queueing infrastructure</title>
<updated>2012-03-08T02:19:48+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2012-02-22T09:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ffbbdd21329f3e15eeca6df2d4bc11c04d9d91c0'/>
<id>urn:sha1:ffbbdd21329f3e15eeca6df2d4bc11c04d9d91c0</id>
<content type='text'>
This rips the message queue in the PL022 driver out and pushes
it into (optional) common infrastructure. Drivers that want to
use the message pumping thread will need to define the new
per-messags transfer methods and leave the deprecated transfer()
method as NULL.

Most of the design is described in the documentation changes that
are included in this patch.

Since there is a queue that need to be stopped when the system
is suspending/resuming, two new calls are implemented for the
device drivers to call in their suspend()/resume() functions:
spi_master_suspend() and spi_master_resume().

ChangeLog v1-&gt;v2:
- Remove Kconfig entry and do not make the queue support optional
  at all, instead be more agressive and have it as part of the
  compulsory infrastructure.
- If the .transfer() method is implemented, delete print a small
  deprecation notice and do not start the transfer pump.
- Fix a bitrotted comment.
ChangeLog v2-&gt;v3:
- Fix up a problematic sequence courtesy of Chris Blair.
- Stop rather than destroy the queue on suspend() courtesy of
  Chris Blair.

Signed-off-by: Chris Blair &lt;chris.blair@stericsson.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Tested-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Reviewed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
</feed>
