[U-Boot] [PATCH 2/4] spi: add spi_set_speed func

Mike Frysinger vapier at gentoo.org
Fri Dec 24 18:09:17 CET 2010


On Friday, December 24, 2010 02:16:07 Thomas Chou wrote:
> --- /dev/null
> +++ b/drivers/spi/spi.c
> @@ -0,0 +1,9 @@
> +#include <common.h>
> +#include <spi.h>
> +
> +/* default func for SPI driver without set speed func */
> +static void __spi_set_speed(struct spi_slave *slave, uint hz)
> +{
> +}
> +void spi_set_speed(struct spi_slave *slave, uint hz)
> +	__attribute__((weak, alias("__spi_set_speed")));

let's not go this route.  just add the prototype to the header and when the 
respective spi bus maintainer wants to support this new func, they can 
implement it.  i'd rather people know about the problem up front rather than 
have things randomly not work.
-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/20101224/9999498e/attachment.pgp 


More information about the U-Boot mailing list