aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/spi
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /Documentation/spi
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'Documentation/spi')
-rw-r--r--Documentation/spi/ep93xx_spi2
-rw-r--r--Documentation/spi/pxa2xx4
-rw-r--r--Documentation/spi/spi-sc18is60236
-rw-r--r--Documentation/spi/spi-summary62
4 files changed, 17 insertions, 87 deletions
diff --git a/Documentation/spi/ep93xx_spi b/Documentation/spi/ep93xx_spi
index 832ddce6e5f..d8eb01c15db 100644
--- a/Documentation/spi/ep93xx_spi
+++ b/Documentation/spi/ep93xx_spi
@@ -26,7 +26,7 @@ arch/arm/mach-ep93xx/ts72xx.c:
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28 28
29#include <linux/platform_data/spi-ep93xx.h> 29#include <mach/ep93xx_spi.h>
30 30
31/* this is our GPIO line used for chip select */ 31/* this is our GPIO line used for chip select */
32#define MMC_CHIP_SELECT_GPIO EP93XX_GPIO_LINE_EGPIO9 32#define MMC_CHIP_SELECT_GPIO EP93XX_GPIO_LINE_EGPIO9
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx
index 3352f97430e..00511e08db7 100644
--- a/Documentation/spi/pxa2xx
+++ b/Documentation/spi/pxa2xx
@@ -2,7 +2,7 @@ PXA2xx SPI on SSP driver HOWTO
2=================================================== 2===================================================
3This a mini howto on the pxa2xx_spi driver. The driver turns a PXA2xx 3This a mini howto on the pxa2xx_spi driver. The driver turns a PXA2xx
4synchronous serial port into a SPI master controller 4synchronous serial port into a SPI master controller
5(see Documentation/spi/spi-summary). The driver has the following features 5(see Documentation/spi/spi_summary). The driver has the following features
6 6
7- Support for any PXA2xx SSP 7- Support for any PXA2xx SSP
8- SSP PIO and SSP DMA data transfers. 8- SSP PIO and SSP DMA data transfers.
@@ -85,7 +85,7 @@ Declaring Slave Devices
85----------------------- 85-----------------------
86Typically each SPI slave (chip) is defined in the arch/.../mach-*/board-*.c 86Typically each SPI slave (chip) is defined in the arch/.../mach-*/board-*.c
87using the "spi_board_info" structure found in "linux/spi/spi.h". See 87using the "spi_board_info" structure found in "linux/spi/spi.h". See
88"Documentation/spi/spi-summary" for additional information. 88"Documentation/spi/spi_summary" for additional information.
89 89
90Each slave device attached to the PXA must provide slave specific configuration 90Each slave device attached to the PXA must provide slave specific configuration
91information via the structure "pxa2xx_spi_chip" found in 91information via the structure "pxa2xx_spi_chip" found in
diff --git a/Documentation/spi/spi-sc18is602 b/Documentation/spi/spi-sc18is602
deleted file mode 100644
index a45702865a3..00000000000
--- a/Documentation/spi/spi-sc18is602
+++ /dev/null
@@ -1,36 +0,0 @@
1Kernel driver spi-sc18is602
2===========================
3
4Supported chips:
5 * NXP SI18IS602/602B/603
6 Datasheet: http://www.nxp.com/documents/data_sheet/SC18IS602_602B_603.pdf
7
8Author:
9 Guenter Roeck <linux@roeck-us.net>
10
11
12Description
13-----------
14
15This driver provides connects a NXP SC18IS602/603 I2C-bus to SPI bridge to the
16kernel's SPI core subsystem.
17
18The driver does not probe for supported chips, since the SI18IS602/603 does not
19support Chip ID registers. You will have to instantiate the devices explicitly.
20Please see Documentation/i2c/instantiating-devices for details.
21
22
23Usage Notes
24-----------
25
26This driver requires the I2C adapter driver to support raw I2C messages. I2C
27adapter drivers which can only handle the SMBus protocol are not supported.
28
29The maximum SPI message size supported by SC18IS602/603 is 200 bytes. Attempts
30to initiate longer transfers will fail with -EINVAL. EEPROM read operations and
31similar large accesses have to be split into multiple chunks of no more than
32200 bytes per SPI message (128 bytes of data per message is recommended). This
33means that programs such as "cp" or "od", which automatically use large block
34sizes to access a device, can not be used directly to read data from EEPROM.
35Programs such as dd, where the block size can be specified, should be used
36instead.
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index 2331eb21414..4884cb33845 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -1,7 +1,7 @@
1Overview of Linux kernel SPI support 1Overview of Linux kernel SPI support
2==================================== 2====================================
3 3
402-Feb-2012 421-May-2007
5 5
6What is SPI? 6What is SPI?
7------------ 7------------
@@ -345,7 +345,7 @@ SPI protocol drivers somewhat resemble platform device drivers:
345 }, 345 },
346 346
347 .probe = CHIP_probe, 347 .probe = CHIP_probe,
348 .remove = CHIP_remove, 348 .remove = __devexit_p(CHIP_remove),
349 .suspend = CHIP_suspend, 349 .suspend = CHIP_suspend,
350 .resume = CHIP_resume, 350 .resume = CHIP_resume,
351 }; 351 };
@@ -355,7 +355,7 @@ device whose board_info gave a modalias of "CHIP". Your probe() code
355might look like this unless you're creating a device which is managing 355might look like this unless you're creating a device which is managing
356a bus (appearing under /sys/class/spi_master). 356a bus (appearing under /sys/class/spi_master).
357 357
358 static int CHIP_probe(struct spi_device *spi) 358 static int __devinit CHIP_probe(struct spi_device *spi)
359 { 359 {
360 struct CHIP *chip; 360 struct CHIP *chip;
361 struct CHIP_platform_data *pdata; 361 struct CHIP_platform_data *pdata;
@@ -483,9 +483,9 @@ also initialize its own internal state. (See below about bus numbering
483and those methods.) 483and those methods.)
484 484
485After you initialize the spi_master, then use spi_register_master() to 485After you initialize the spi_master, then use spi_register_master() to
486publish it to the rest of the system. At that time, device nodes for the 486publish it to the rest of the system. At that time, device nodes for
487controller and any predeclared spi devices will be made available, and 487the controller and any predeclared spi devices will be made available,
488the driver model core will take care of binding them to drivers. 488and the driver model core will take care of binding them to drivers.
489 489
490If you need to remove your SPI controller driver, spi_unregister_master() 490If you need to remove your SPI controller driver, spi_unregister_master()
491will reverse the effect of spi_register_master(). 491will reverse the effect of spi_register_master().
@@ -521,53 +521,21 @@ SPI MASTER METHODS
521 ** When you code setup(), ASSUME that the controller 521 ** When you code setup(), ASSUME that the controller
522 ** is actively processing transfers for another device. 522 ** is actively processing transfers for another device.
523 523
524 master->transfer(struct spi_device *spi, struct spi_message *message)
525 This must not sleep. Its responsibility is arrange that the
526 transfer happens and its complete() callback is issued. The two
527 will normally happen later, after other transfers complete, and
528 if the controller is idle it will need to be kickstarted.
529
524 master->cleanup(struct spi_device *spi) 530 master->cleanup(struct spi_device *spi)
525 Your controller driver may use spi_device.controller_state to hold 531 Your controller driver may use spi_device.controller_state to hold
526 state it dynamically associates with that device. If you do that, 532 state it dynamically associates with that device. If you do that,
527 be sure to provide the cleanup() method to free that state. 533 be sure to provide the cleanup() method to free that state.
528 534
529 master->prepare_transfer_hardware(struct spi_master *master)
530 This will be called by the queue mechanism to signal to the driver
531 that a message is coming in soon, so the subsystem requests the
532 driver to prepare the transfer hardware by issuing this call.
533 This may sleep.
534
535 master->unprepare_transfer_hardware(struct spi_master *master)
536 This will be called by the queue mechanism to signal to the driver
537 that there are no more messages pending in the queue and it may
538 relax the hardware (e.g. by power management calls). This may sleep.
539
540 master->transfer_one_message(struct spi_master *master,
541 struct spi_message *mesg)
542 The subsystem calls the driver to transfer a single message while
543 queuing transfers that arrive in the meantime. When the driver is
544 finished with this message, it must call
545 spi_finalize_current_message() so the subsystem can issue the next
546 transfer. This may sleep.
547
548 DEPRECATED METHODS
549
550 master->transfer(struct spi_device *spi, struct spi_message *message)
551 This must not sleep. Its responsibility is arrange that the
552 transfer happens and its complete() callback is issued. The two
553 will normally happen later, after other transfers complete, and
554 if the controller is idle it will need to be kickstarted. This
555 method is not used on queued controllers and must be NULL if
556 transfer_one_message() and (un)prepare_transfer_hardware() are
557 implemented.
558
559 535
560SPI MESSAGE QUEUE 536SPI MESSAGE QUEUE
561 537
562If you are happy with the standard queueing mechanism provided by the 538The bulk of the driver will be managing the I/O queue fed by transfer().
563SPI subsystem, just implement the queued methods specified above. Using
564the message queue has the upside of centralizing a lot of code and
565providing pure process-context execution of methods. The message queue
566can also be elevated to realtime priority on high-priority SPI traffic.
567
568Unless the queueing mechanism in the SPI subsystem is selected, the bulk
569of the driver will be managing the I/O queue fed by the now deprecated
570function transfer().
571 539
572That queue could be purely conceptual. For example, a driver used only 540That queue could be purely conceptual. For example, a driver used only
573for low-frequency sensor access might be fine using synchronous PIO. 541for low-frequency sensor access might be fine using synchronous PIO.
@@ -593,6 +561,4 @@ Stephen Street
593Mark Underwood 561Mark Underwood
594Andrew Victor 562Andrew Victor
595Vitaly Wool 563Vitaly Wool
596Grant Likely 564
597Mark Brown
598Linus Walleij