[RFC 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-12 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos Cc: David Brownell Cc: spi-devel-general@lists.sourceforge.net --- .../include/asm/mach-ath79/ath79_spi_platform.h| 19 ++ drivers/spi/Kconfig

[RFC 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-12 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos Cc: David Brownell Cc: spi-devel-general@lists.sourceforge.net --- Sorry for sending this twice, i forgot to add some CCs in the first round. .../include

Re: [RFC 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-14 Thread Gabor Juhos
Hi Grant, >> <...> >> +#include >> + >> +#define DRV_DESC"SPI controller driver for Atheros AR71XX/AR724X/AR91X" > > Used exactly once. Don't bother with a #define Ok. >> +#define DRV_NAME"ath79-spi" >> + >> +struct ath79_spi { >> +struct spi_bitbang bitbang; >> +u32

Re: [RFC 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-15 Thread Gabor Juhos
2010.11.15. 5:04 keltezéssel, Grant Likely írta: > On Sun, Nov 14, 2010 at 10:03:56PM +0100, Gabor Juhos wrote: >>>> +static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) >>>> +{ >>>> + return __raw_readl(sp->base + reg); >>>>

[PATCH 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-23 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos Cc: Grant Likely Cc: David Brownell Cc: spi-devel-general@lists.sourceforge.net --- Changes since RFC: - remove DRV_DESC definition and use its

[PATCH v2 09/16] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-12-22 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos Cc: David Brownell Cc: spi-devel-general@lists.sourceforge.net --- Changes since RFC: - remove DRV_DESC definition and use its previous value directly

[PATCH v3 09/16] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-12-28 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos Cc: David Brownell Cc: spi-devel-general@lists.sourceforge.net --- Changes since RFC: - remove DRV_DESC definition and use its previous value directly

[PATCH v4 09/16] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2011-01-02 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos Cc: David Brownell Cc: spi-devel-general@lists.sourceforge.net --- Changes since RFC: - remove DRV_DESC definition and use its previous value directly in

Re: [PATCH v4 09/16] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2011-01-04 Thread Gabor Juhos
2011.01.03. 18:02 keltezéssel, Grant Likely írta: > On Sun, Jan 02, 2011 at 07:56:22PM +0100, Gabor Juhos wrote: >> The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This >> patch implements a driver for that. >> > > Mostly looks okay to me. A few c

[PATCH v5 09/16] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2011-01-04 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos Cc: David Brownell Cc: spi-devel-general@lists.sourceforge.net Acked-by: Grant Likely --- Changes since RFC: - remove DRV_DESC definition and use its

[PATCH] SPI: spi-ath79: fix compile error due to missing include

2011-11-16 Thread Gabor Juhos
x27;...' before string constant drivers/spi/spi-ath79.c:281:1: warning: data definition has no type or storage class drivers/spi/spi-ath79.c:281:1: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS' drivers/spi/spi-ath79.c:281:14: warning: function decla

[PATCH 1/6] spi/ath79: add delay between SCK changes

2012-12-27 Thread Gabor Juhos
The driver uses the "as fast as it can" approach to drive the SCK signal. However this does not work with certain low speed SPI chips (e.g. the PCF2123 RTC chip). The patch adds per-bit slowdowns in order to be able to use the driver with such chips as well. Signed-off-by: G

[PATCH 2/6] spi/ath79: add missing HIGH->LOW SCK transition

2012-12-27 Thread Gabor Juhos
The 'ath79_spi_txrx_mode0' function does not set the SCK signal to LOW at the end of a word transfer. This causes communications errors with certain devices (e.g. the PCF2123 RTC chip). The patch ensures that the SCK signal will be LOW. Signed-off-by: Gabor Juhos --- drivers/spi/s

[PATCH 6/6] spi/ath79: add shutdown handler

2012-12-27 Thread Gabor Juhos
a kexec'd kernel because the SPI driver does not restore the special mode during shutdown. The patch adds a shutdown handler to fix this issue. Signed-off-by: Gabor Juhos --- drivers/spi/spi-ath79.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH 4/6] spi/ath79: use gpio_request_one

2012-12-27 Thread Gabor Juhos
Use gpio_request_one() instead of multiple gpiolib calls. Signed-off-by: Gabor Juhos --- drivers/spi/spi-ath79.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index a725e62..19d539e 100644 --- a

[PATCH 0/6] spi/ath79: various fixes

2012-12-27 Thread Gabor Juhos
This patch set contain various fixes for the spi-ath79 driver. Gabor Juhos (6): spi/ath79: add delay between SCK changes spi/ath79: add missing HIGH->LOW SCK transition spi/ath79: remove superfluous chip select code spi/ath79: use gpio_request_one spi/ath79: avoid multi

[PATCH 3/6] spi/ath79: remove superfluous chip select code

2012-12-27 Thread Gabor Juhos
The spi_bitbang driver calls the chipselect function of the driver from spi_bitbang_setup in order to deselect the given SPI chip, so we don't have to initialize the CS line here. Signed-off-by: Gabor Juhos --- drivers/spi/spi-ath79.c |6 -- 1 file changed, 6 deletions(-) diff --

[PATCH 5/6] spi/ath79: avoid multiple initialization of the SPI controller

2012-12-27 Thread Gabor Juhos
those from probe/response in order to avoid the mutliple initialization of the controller. Signed-off-by: Gabor Juhos --- drivers/spi/spi-ath79.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/drivers/spi/spi-ath79.c b/drivers/spi

Re: [PATCH 1/6] spi/ath79: add delay between SCK changes

2013-02-05 Thread Gabor Juhos
Hi Grant, > On Thu, 27 Dec 2012 10:42:24 +0100, Gabor Juhos wrote: >> The driver uses the "as fast as it can" approach >> to drive the SCK signal. However this does not >> work with certain low speed SPI chips (e.g. the >> PCF2123 RTC chip). >> >>

Re: [PATCH 6/6] spi/ath79: add shutdown handler

2013-02-05 Thread Gabor Juhos
2013.02.05. 14:02 keltezéssel, Grant Likely írta: >> -static int ath79_spi_remove(struct platform_device *pdev) >> +static void __ath79_spi_remove(struct platform_device *pdev) >> { >> struct ath79_spi *sp = platform_get_drvdata(pdev); >> >> @@ -304,13 +304,23 @@ static int ath79_spi_remov

[PATCH v2] spi/ath79: add shutdown handler

2013-02-05 Thread Gabor Juhos
a kexec'd kernel because the SPI driver does not restore the special mode during shutdown. The patch adds a shutdown handler to fix this issue. Signed-off-by: Gabor Juhos --- Changes since v1: - call ath79_spi_remote(pdev) directly from ath79_spi_shutdown() --- drivers/spi/spi-ath79.c |