diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-04-21 12:24:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-21 13:41:50 -0700 |
commit | 6e538aaf50ae782a890cbc02c27950448d8193e1 (patch) | |
tree | 0e61cacadc2fe403f411e52ba18539bdd52b17e2 /include | |
parent | 14fadca793e39742f442df53391cdd1437b9262f (diff) | |
download | op-kernel-dev-6e538aaf50ae782a890cbc02c27950448d8193e1.zip op-kernel-dev-6e538aaf50ae782a890cbc02c27950448d8193e1.tar.gz |
spi: documentation: emphasise spi_master.setup() semantics
This is a doc-only patch which I hope will reduce the number of
spi_master controller driver patches starting out with a common
implementation bug.
(As in: almost every spi_master driver I see starts out with its
version of this bug. Sigh.)
It just re-emphasizes that the setup() method may be called for one
device while a transfer is active on another ... which means that most
driver implementations shouldn't touch any registers.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/spi/spi.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 2cc43fa..a0faa18 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -245,7 +245,12 @@ struct spi_master { */ u16 dma_alignment; - /* setup mode and clock, etc (spi driver may call many times) */ + /* Setup mode and clock, etc (spi driver may call many times). + * + * IMPORTANT: this may be called when transfers to another + * device are active. DO NOT UPDATE SHARED REGISTERS in ways + * which could break those transfers. + */ int (*setup)(struct spi_device *spi); /* bidirectional bulk transfers |