lkml.org 
[lkml]   [2009]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] spi_bitbang: Add more lowlevel function documentation
Date
This adds more documentation of the lowlevel API to avoid future bugs.

Signed-off-by: Michael Buesch <mb@bu3sch.de>

---

Index: linux-2.6/include/linux/spi/spi_bitbang.h
===================================================================
--- linux-2.6.orig/include/linux/spi/spi_bitbang.h 2009-02-19 11:59:23.000000000 +0100
+++ linux-2.6/include/linux/spi/spi_bitbang.h 2009-02-19 12:04:09.000000000 +0100
@@ -83,6 +83,13 @@ extern int spi_bitbang_stop(struct spi_b
* int getmiso(struct spi_device *);
* void spidelay(unsigned);
*
+ * setsck()'s is_on parameter is a zero/nonzero boolean.
+ *
+ * setmosi()'s is_on parameter is a zero/nonzero boolean.
+ *
+ * getmiso() is required to return 0 or 1 only. Any other value is invalid
+ * and will result in improper operation.
+ *
* A non-inlined routine would call bitbang_txrx_*() routines. The
* main loop could easily compile down to a handful of instructions,
* especially if the delay is a NOP (to run at peak speed).
--
Greetings, Michael.


\
 
 \ /
  Last update: 2009-02-19 12:11    [W:0.038 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site