<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/spi/mcp23s08.h, branch v3.17.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>mcp23s08: get rid of setup/teardown callbacks</title>
<updated>2011-07-15T19:54:17+00:00</updated>
<author>
<name>Peter Korsgaard</name>
<email>jacmet@sunsite.dk</email>
</author>
<published>2011-07-15T08:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1bb6f9b042eb1428ba927d2e851a00df6308877a'/>
<id>1bb6f9b042eb1428ba927d2e851a00df6308877a</id>
<content type='text'>
There's no in-tree users, and bus notifiers are more generic anyway.

Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no in-tree users, and bus notifiers are more generic anyway.

Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio/mcp23s08: support mcp23s17 variant</title>
<updated>2011-03-12T08:26:34+00:00</updated>
<author>
<name>Peter Korsgaard</name>
<email>jacmet@sunsite.dk</email>
</author>
<published>2011-03-09T16:56:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0b7bb77fd55903ff9dc7c0474c49002aa6b9c78c'/>
<id>0b7bb77fd55903ff9dc7c0474c49002aa6b9c78c</id>
<content type='text'>
mpc23s17 is very similar to the mcp23s08, except that registers are 16bit
wide, so extend the interface to work with both variants.

The s17 variant also has an additional address pin, so adjust platform
data structure to support up to 8 devices per SPI chipselect.

Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
mpc23s17 is very similar to the mcp23s08, except that registers are 16bit
wide, so extend the interface to work with both variants.

The s17 variant also has an additional address pin, so adjust platform
data structure to support up to 8 devices per SPI chipselect.

Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpio: mcp23s08 handles multiple chips per chipselect</title>
<updated>2008-07-25T17:53:30+00:00</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2008-07-25T08:46:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8f1cc3b10e6ee0c5c7c8ed27f8771c4f252b4862'/>
<id>8f1cc3b10e6ee0c5c7c8ed27f8771c4f252b4862</id>
<content type='text'>
Teach the mcp23s08 driver about a curious feature of these chips: up to
four of them can share the same chipselect, with the SPI signals wired in
parallel, by matching two bits in the first protocol byte against two
address lines on the chip.

This is handled by three software changes:

  * Platform data now holds an array of per-chip structs, not
    just one chip's address and pullup configuration.

  * Probe() and remove() now use another level of structure,
    wrapping an instance of the original structure for each
    mcp23s08 chip sharing that chipselect.

  * The HAEN bit is set, so that the hardware address bits can no
    longer be ignored (boot firmware may not have enabled them).

The "one struct per chip" preserves the guts of the current code,
but platform_data will need minor changes.

    OLD:
	/* incorrect "slave" ID may not have mattered */
	.slave = 3,
	.pullups = BIT(3) | BIT(1) | BIT(0),

    NEW:
	/* slave address _must_ match chip's wiring */
	.chip[3] = {
		.is_present = true,
		.pullups = BIT(3) | BIT(1) | BIT(0),
	},

There's no change in how things _behave_ for spi_device nodes with a
single mcp23s08 chip.  New multi-chip configurations assign GPIOs in
sequence, without holes.  The spi_device just resembles a bigger
controller, but internally it has multiple gpio_chip instances.

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Teach the mcp23s08 driver about a curious feature of these chips: up to
four of them can share the same chipselect, with the SPI signals wired in
parallel, by matching two bits in the first protocol byte against two
address lines on the chip.

This is handled by three software changes:

  * Platform data now holds an array of per-chip structs, not
    just one chip's address and pullup configuration.

  * Probe() and remove() now use another level of structure,
    wrapping an instance of the original structure for each
    mcp23s08 chip sharing that chipselect.

  * The HAEN bit is set, so that the hardware address bits can no
    longer be ignored (boot firmware may not have enabled them).

The "one struct per chip" preserves the guts of the current code,
but platform_data will need minor changes.

    OLD:
	/* incorrect "slave" ID may not have mattered */
	.slave = 3,
	.pullups = BIT(3) | BIT(1) | BIT(0),

    NEW:
	/* slave address _must_ match chip's wiring */
	.chip[3] = {
		.is_present = true,
		.pullups = BIT(3) | BIT(1) | BIT(0),
	},

There's no change in how things _behave_ for spi_device nodes with a
single mcp23s08 chip.  New multi-chip configurations assign GPIOs in
sequence, without holes.  The spi_device just resembles a bigger
controller, but internally it has multiple gpio_chip instances.

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;
</pre>
</div>
</content>
</entry>
<entry>
<title>mcp23s08 spi gpio expander support</title>
<updated>2008-02-05T17:44:13+00:00</updated>
<author>
<name>David Brownell</name>
<email>dbrownell@users.sourceforge.net</email>
</author>
<published>2008-02-05T06:28:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e58b9e2762a6ef99e20dba47aba21b911658541d'/>
<id>e58b9e2762a6ef99e20dba47aba21b911658541d</id>
<content type='text'>
Basic driver for 8-bit SPI based MCP23S08 GPIO expander, without support for
IRQs or the shared chipselect mechanism.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Eric Miao &lt;eric.miao@marvell.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
Cc: Philipp Zabel &lt;philipp.zabel@gmail.com&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Ben Gardner &lt;bgardner@wabtec.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Basic driver for 8-bit SPI based MCP23S08 GPIO expander, without support for
IRQs or the shared chipselect mechanism.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Eric Miao &lt;eric.miao@marvell.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
Cc: Philipp Zabel &lt;philipp.zabel@gmail.com&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Ben Gardner &lt;bgardner@wabtec.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
