linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi_bitbang: Add more lowlevel function documentation
@ 2009-02-19 11:06 Michael Buesch
  2009-02-19 19:34 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Buesch @ 2009-02-19 11:06 UTC (permalink / raw)
  To: David Brownell; +Cc: Andrew Morton, linux-kernel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi_bitbang: Add more lowlevel function documentation
  2009-02-19 11:06 [PATCH] spi_bitbang: Add more lowlevel function documentation Michael Buesch
@ 2009-02-19 19:34 ` David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2009-02-19 19:34 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Andrew Morton, linux-kernel

On Thursday 19 February 2009, Michael Buesch wrote:
> This adds more documentation of the lowlevel API to avoid future bugs.
> 
> Signed-off-by: Michael Buesch <mb@bu3sch.de>

Acked-by: David Brownell <dbrownell@users.sourceforge.net>

... thanks.


> ---
> 
> 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.
> 
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-19 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-19 11:06 [PATCH] spi_bitbang: Add more lowlevel function documentation Michael Buesch
2009-02-19 19:34 ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).