[U-Boot] [PATCH] support spi gpio driver by control gpio bitbang

Mike Frysinger vapier at gentoo.org
Wed Sep 1 19:11:10 CEST 2010


On Wednesday, September 01, 2010 03:28:28 Donghwa Lee wrote:
> This patch adds basic support for spi mode 0~3 by control gpio bitbang.
> It uses several gpio pin and emulates spi chipselect signal, clock signal
> and sda signal as if spi controller generate spi signal.

if you're going to make a spi bus driver that uses gpios to bitbang, then you 
really should be using the generic GPIO framework.  it's the same in u-boot as 
in linux.

please fix your patch summary.  it should probably look like:
	spi_gpio: new gpio bitbang driver

further, drivers/spi/ is for the u-boot unified spi layer.  your driver does 
not conform to that API, so that needs fixing too.

> Signed-off-by: Donghwa Lee <dh09.lee at samsung.com>

your e-mail is still broken.  it should be "@", not " at ".

> +#include <asm/arch/gpio.h>

asm/gpio.h is the generic GPIO layer

> +struct spi_platform_data {
> +	struct s5p_gpio_bank *cs_bank;
> +	struct s5p_gpio_bank *clk_bank;
> +	struct s5p_gpio_bank *si_bank;
> +	struct s5p_gpio_bank *so_bank;

these structs are arch-specific, so this is going to break pretty much 
everyone else.  although, once you fix the implementation to follow the 
unified SPI interface, this struct wont exist anymore.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100901/faec9895/attachment.pgp 


More information about the U-Boot mailing list