aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/spi/spi-summary13
-rw-r--r--drivers/mtd/devices/m25p80.c4
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c2
-rw-r--r--drivers/spi/Kconfig10
-rw-r--r--drivers/spi/Makefile1
5 files changed, 28 insertions, 2 deletions
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index 761debf748e..a5ffba33a35 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -115,6 +115,9 @@ shows up in sysfs in several locations:
115 /sys/devices/.../CTLR/spiB.C ... spi_device for on bus "B", 115 /sys/devices/.../CTLR/spiB.C ... spi_device for on bus "B",
116 chipselect C, accessed through CTLR. 116 chipselect C, accessed through CTLR.
117 117
118 /sys/devices/.../CTLR/spiB.C/modalias ... identifies the driver
119 that should be used with this device (for hotplug/coldplug)
120
118 /sys/bus/spi/devices/spiB.C ... symlink to the physical 121 /sys/bus/spi/devices/spiB.C ... symlink to the physical
119 spiB-C device 122 spiB-C device
120 123
@@ -247,6 +250,12 @@ driver is registered:
247 250
248Like with other static board-specific setup, you won't unregister those. 251Like with other static board-specific setup, you won't unregister those.
249 252
253The widely used "card" style computers bundle memory, cpu, and little else
254onto a card that's maybe just thirty square centimeters. On such systems,
255your arch/.../mach-.../board-*.c file would primarily provide information
256about the devices on the mainboard into which such a card is plugged. That
257certainly includes SPI devices hooked up through the card connectors!
258
250 259
251NON-STATIC CONFIGURATIONS 260NON-STATIC CONFIGURATIONS
252 261
@@ -258,6 +267,10 @@ up the spi bus master, and will likely need spi_new_device() to provide the
258board info based on the board that was hotplugged. Of course, you'd later 267board info based on the board that was hotplugged. Of course, you'd later
259call at least spi_unregister_device() when that board is removed. 268call at least spi_unregister_device() when that board is removed.
260 269
270When Linux includes support for MMC/SD/SDIO/DataFlash cards through SPI, those
271configurations will also be dynamic. Fortunately, those devices all support
272basic device identification probes, so that support should hotplug normally.
273
261 274
262How do I write an "SPI Protocol Driver"? 275How do I write an "SPI Protocol Driver"?
263---------------------------------------- 276----------------------------------------
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 45108ed8558..d5f24089be7 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -378,7 +378,9 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
378 378
379 spi_sync(flash->spi, &m); 379 spi_sync(flash->spi, &m);
380 380
381 *retlen += m.actual_length - sizeof(flash->command); 381 if (retlen)
382 *retlen += m.actual_length
383 - sizeof(flash->command);
382 } 384 }
383 } 385 }
384 386
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 99d3a0320fc..155737e7483 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -508,7 +508,7 @@ add_dataflash(struct spi_device *spi, char *name,
508 priv->partitioned = 1; 508 priv->partitioned = 1;
509 return add_mtd_partitions(device, parts, nr_parts); 509 return add_mtd_partitions(device, parts, nr_parts);
510 } 510 }
511 } else if (pdata->nr_parts) 511 } else if (pdata && pdata->nr_parts)
512 dev_warn(&spi->dev, "ignoring %d default partitions on %s\n", 512 dev_warn(&spi->dev, "ignoring %d default partitions on %s\n",
513 pdata->nr_parts, device->name); 513 pdata->nr_parts, device->name);
514 514
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 9b21c5d77b4..7a75faeb052 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -65,6 +65,16 @@ config SPI_BITBANG
65 need it. You only need to select this explicitly to support driver 65 need it. You only need to select this explicitly to support driver
66 modules that aren't part of this kernel tree. 66 modules that aren't part of this kernel tree.
67 67
68config SPI_BUTTERFLY
69 tristate "Parallel port adapter for AVR Butterfly (DEVELOPMENT)"
70 depends on SPI_MASTER && PARPORT && EXPERIMENTAL
71 select SPI_BITBANG
72 help
73 This uses a custom parallel port cable to connect to an AVR
74 Butterfly <http://www.atmel.com/products/avr/butterfly>, an
75 inexpensive battery powered microcontroller evaluation board.
76 This same cable can be used to flash new firmware.
77
68# 78#
69# Add new SPI master controllers in alphabetical order above this line 79# Add new SPI master controllers in alphabetical order above this line
70# 80#
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 5da6a4df401..c2c87e845ab 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_SPI_MASTER) += spi.o
12 12
13# SPI master controller drivers (bus) 13# SPI master controller drivers (bus)
14obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o 14obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o
15obj-$(CONFIG_SPI_BUTTERFLY) += spi_butterfly.o
15# ... add above this line ... 16# ... add above this line ...
16 17
17# SPI protocol drivers (device/link on bus) 18# SPI protocol drivers (device/link on bus)