[PATCH] spi/bfin_spi: respect cs_change even in last transfer

2011-06-23 Thread Mike Frysinger
erich Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index cc880c9..50f6f48 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/driver

[PATCH 1/4 v2] spi/bfin_spi: fix handling of default bits per word setting

2011-06-17 Thread Mike Frysinger
nsfer: unsupported bits_per_word So in the transfer logic, have a bits_per_word setting of 0 fall into the 8 bit transfer logic. Signed-off-by: Mike Frysinger --- v2 - wasn't quite as simple as i'd hope ... drivers/spi/spi_bfin5xx.c |7 --- 1 files changed, 4 insertions(

[PATCH 3/4] spi/bfin_spi: constify pin array

2011-06-17 Thread Mike Frysinger
This array isn't written anywhere, so constify it. Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 8822bcc..32d900d 100644 --- a/driver

[PATCH 2/4] spi/bfin_spi: use structs for accessing hardware regs

2011-06-17 Thread Mike Frysinger
Rather than hardcoding the register sizes/offsets in this file, use the existing struct in the spi header for reading/writing the hardware. Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 208 ++--- 1 files changed, 84 insertions(+), 124

[PATCH 1/4] spi/bfin_spi: fix handling of default bits per word setting

2011-06-17 Thread Mike Frysinger
nsfer: unsupported bits_per_word So in the transfer logic, have a bits_per_word setting of 0 fall into the 8 bit transfer logic. Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/driver

[PATCH 4/4] spi/bfin_spi: uninline fat queue funcs

2011-06-17 Thread Mike Frysinger
There's no need for these queue funcs to be inlined, so drop the markings. This shaves off a few hundred duplicated bytes. Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi_bfin5x

[PATCH] spi/bfin_spi: fix reverse condition during interrupt mode

2011-06-15 Thread Mike Frysinger
iu Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index f706dba..ae30fa3 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -43

Re: [PATCH v2] spi: reorganize drivers

2011-06-06 Thread Mike Frysinger
On Tue, Jun 7, 2011 at 00:48, Feng Tang wrote: > On Tue, 7 Jun 2011 12:09:52 +0800 Grant Likely wrote: >> On Mon, Jun 6, 2011 at 8:28 PM, Feng Tang wrote: >> > On Tue, 7 Jun 2011 00:49:20 +0800 Dirk Brandewie wrote: >> >> My changes are to the designware driver :-) I will get my patches >> >> re-ba

Re: [PATCH v2] spi: reorganize drivers

2011-06-06 Thread Mike Frysinger
On Tue, Jun 7, 2011 at 00:32, Tomoya MORINAGA wrote: > (2011/06/07 1:52), Grant Likely wrote: >> Hahaha.  Oops, I can't remember the conversation I had 5 minutes after >> getting off the phone. >> >> It should actually be Tomoya who can comment on the name change. > > As far as I know, this change

Re: [PATCH v2] spi: reorganize drivers

2011-06-06 Thread Mike Frysinger
On Mon, Jun 6, 2011 at 03:18, Grant Likely wrote: > Sort the SPI makefile and enforce the naming convention spi_*.c for > spi drivers. spi_topcliff_pch.c uses KBUILD_MODNAME with a few funcs, but perhaps those are only for /proc/ status tracking ? worth double checking ... -mike

Re: [uclinux-dist-devel] [PATCH v3] spi/spi_bfin_sport: new driver for a SPI bus via the Blackfin SPORT peripheral

2011-05-25 Thread Mike Frysinger
On Mon, Mar 28, 2011 at 04:57, Mike Frysinger wrote: > The Blackfin SPORT peripheral is a pretty flexible device.  With enough > coaching, we can make it generate SPI compatible waveforms.  This is > desirable as the SPORT can run at much higher clock frequencies than the > dedicated

Re: [PATCH] spi: Fix race condition in stop_queue()

2011-04-06 Thread Mike Frysinger
On Wed, Apr 6, 2011 at 10:49, Vasily Khoruzhick wrote: >  drivers/spi/spi_bfin5xx.c |    2 +- seems to past my smoke test. Acked-by: Mike Frysinger -mike -- Xperia(TM) PLAY It's a major breakthrough. An authenti

[PATCH v3] spi/spi_bfin_sport: new driver for a SPI bus via the Blackfin SPORT peripheral

2011-03-28 Thread Mike Frysinger
. It also opens up the possibility of multiple SPI buses in case someone wants to dedicate a whole bus to a specific part that does not play well with others. Signed-off-by: Cliff Cai Signed-off-by: Bryan Wu Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- v3 - fix up

Re: [uclinux-dist-devel] [PATCH v2] spi/bfin_sport_spi: new driver for a SPI bus via the Blackfin SPORT peripheral

2011-03-28 Thread Mike Frysinger
On Tue, Feb 15, 2011 at 16:20, Grant Likely wrote: > On Tue, Jan 11, 2011 at 02:22:05PM -0500, Mike Frysinger wrote: >> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig >> index 1906840..95ba5fe 100644 >> --- a/drivers/spi/Kconfig >> +++ b/drivers/spi/Kconfig &

Re: [uclinux-dist-devel] [PATCH] spi:add support for slave function in current spi framework

2011-01-31 Thread Mike Frysinger
On Mon, Jan 31, 2011 at 03:46, Aaron.Wu wrote: > --- a/include/linux/spi/spi.h > +++ b/include/linux/spi/spi.h > @@ -240,9 +246,9 @@ static inline void spi_unregister_driver(struct > spi_driver *sdrv) >  */ >  struct spi_master { >        struct device   dev; > - >        struct list_head list; >

[PATCH v2] spi/bfin_sport_spi: new driver for a SPI bus via the Blackfin SPORT peripheral

2011-01-11 Thread Mike Frysinger
. It also opens up the possibility of multiple SPI buses in case someone wants to dedicate a whole bus to a specific part that does not play well with others. Signed-off-by: Cliff Cai Signed-off-by: Bryan Wu Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- drivers/spi/Kconfig

Re: [uclinux-dist-devel] [Uclinux-dist-devel] [PATCH] spi/bfin_sport_spi: new driver to emulate a SPI bus using Blackfin SPORT peripheral

2011-01-11 Thread Mike Frysinger
On Mon, Jan 10, 2011 at 10:22, Grant Likely wrote: > On Mon, Jan 10, 2011 at 09:39:40AM -0500, Mike Frysinger wrote: >> On Mon, Nov 1, 2010 at 01:56, Grant Likely wrote: >> > On Fri, Oct 22, 2010 at 02:53:35AM -0400, Mike Frysinger wrote: >> >> +     /* SPI framewor

[PATCH 2/2] spi/bfin_spi: return immediately after skipping to next transfer

2011-01-11 Thread Mike Frysinger
From: Sonic Zhang If there is an error with setting up a transfer, we need to return immediately rather than trying to continue to process things. We already set up the error states for the caller at this point. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger --- drivers/spi

[PATCH 1/2] spi/bfin_spi: support for multiples of 8bits with hardware CS

2011-01-11 Thread Mike Frysinger
From: Bob Liu We can do multiples of 8bit transfers when using the hardware CS and a little bit of magic, so make it work. Signed-off-by: Bob Liu Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 103 +++-- 1 files changed, 71 insertions

Re: [Uclinux-dist-devel] [PATCH] spi/bfin_sport_spi: new driver to emulate a SPI bus using Blackfin SPORT peripheral

2011-01-10 Thread Mike Frysinger
On Mon, Nov 1, 2010 at 01:56, Grant Likely wrote: > On Fri, Oct 22, 2010 at 02:53:35AM -0400, Mike Frysinger wrote: >> +     /* SPI framework hookup */ >> +     struct spi_master *master; >> + >> +     /* Regs base of SPI controller */ >> +     volatile st

Re: [Uclinux-dist-devel] [PATCH 1/2] spi/bfin_spi: only request GPIO on first load

2010-10-22 Thread Mike Frysinger
On Fri, Oct 22, 2010 at 03:25, Grant Likely wrote: > On Fri, Oct 22, 2010 at 02:41:12AM -0400, Mike Frysinger wrote: >> On Fri, Oct 22, 2010 at 02:30, Grant Likely wrote: >> > On Fri, Oct 22, 2010 at 02:01:47AM -0400, Mike Frysinger wrote: >> >> From: Michael Henn

Re: [Uclinux-dist-devel] [PATCH] spi/bfin_sport_spi: new driver to emulate a SPI bus using Blackfin SPORT peripheral

2010-10-22 Thread Mike Frysinger
On Fri, Oct 22, 2010 at 03:16, Grant Likely wrote: > On Fri, Oct 22, 2010 at 02:53:35AM -0400, Mike Frysinger wrote: >> From: Cliff Cai >> >> The Blackfin SPORT peripheral is a pretty flexible device.  With enough >> coaching, we can make it generate SPI com

[PATCH] spi/bfin_sport_spi: new driver to emulate a SPI bus using Blackfin SPORT peripheral

2010-10-21 Thread Mike Frysinger
. It also opens up the possibility of multiple SPI buses in case someone wants to dedicate a whole bus to a specific part that does not play well with others. Signed-off-by: Cliff Cai Signed-off-by: Bryan Wu Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- drivers/spi/Kconfig

Re: [Uclinux-dist-devel] [PATCH 1/2] spi/bfin_spi: only request GPIO on first load

2010-10-21 Thread Mike Frysinger
On Fri, Oct 22, 2010 at 02:30, Grant Likely wrote: > On Fri, Oct 22, 2010 at 02:01:47AM -0400, Mike Frysinger wrote: >> From: Michael Hennerich >> >> The gpiolib code does not allow people to do gpio_request() on a GPIO >> once it has already been requested.  So ma

[PATCH 2/2] spi/bfin_spi: handle error/status changes after data interrupts

2010-10-21 Thread Mike Frysinger
interrupt once we've successfully finished processing all of the pending data. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/driver

[PATCH 1/2] spi/bfin_spi: only request GPIO on first load

2010-10-21 Thread Mike Frysinger
), the setup function incorrectly fails. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index ab483a0..a8f276d

Re: [Uclinux-dist-devel] [PATCH 00/28] Blackfin SPI updates for 2.6.36

2010-10-17 Thread Mike Frysinger
On Mon, Oct 18, 2010 at 02:34, Mike Frysinger wrote: > On Mon, Oct 18, 2010 at 02:28, Grant Likely wrote: >> On Sun, Oct 17, 2010 at 06:59:13PM -0400, Mike Frysinger wrote: >>> Quite a bit here, but these patches have been around for a while.  The >>> reason they haven&

[PATCH 29/28] spi/bfin_spi: namespace local structs

2010-10-17 Thread Mike Frysinger
Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 119 +++-- 1 files changed, 61 insertions(+), 58 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index d17ab37..ab483a0 100644 --- a/drivers/spi/spi_bfin5xx.c

Re: [Uclinux-dist-devel] [PATCH 00/28] Blackfin SPI updates for 2.6.36

2010-10-17 Thread Mike Frysinger
On Mon, Oct 18, 2010 at 02:34, Mike Frysinger wrote: > On Mon, Oct 18, 2010 at 02:28, Grant Likely wrote: >> I *might* pick these up for .36, but it is very late for picking up >> stuff that hasn't had any linux-next exposure yet. > > these issues have been around for so

Re: [Uclinux-dist-devel] [PATCH 00/28] Blackfin SPI updates for 2.6.36

2010-10-17 Thread Mike Frysinger
On Mon, Oct 18, 2010 at 02:28, Grant Likely wrote: > On Sun, Oct 17, 2010 at 06:59:13PM -0400, Mike Frysinger wrote: >> Quite a bit here, but these patches have been around for a while.  The >> reason they haven't been pushed up before was that some of the first >> cha

Re: [Uclinux-dist-devel] [PATCH 11/28] Blackfin SPI: convert struct names to something more logical

2010-10-17 Thread Mike Frysinger
On Mon, Oct 18, 2010 at 02:20, Grant Likely wrote: > On Mon, Oct 18, 2010 at 02:10:17AM -0400, Mike Frysinger wrote: >> On Mon, Oct 18, 2010 at 02:02, Grant Likely wrote: >> > On Sun, Oct 17, 2010 at 06:59:24PM -0400, Mike Frysinger wrote: >> >> -struct driver_da

Re: [Uclinux-dist-devel] [PATCH 28/28] Blackfin SPI: init early

2010-10-17 Thread Mike Frysinger
On Mon, Oct 18, 2010 at 02:12, Grant Likely wrote: > On Sun, Oct 17, 2010 at 06:59:41PM -0400, Mike Frysinger wrote: >> From: Michael Hennerich >> >> Some systems using this bus sometimes have very basic devices on them >> such as regulators.  So we need to be load

Re: [Uclinux-dist-devel] [PATCH 14/28] Blackfin: SPI: expand SPI bitmasks

2010-10-17 Thread Mike Frysinger
On Mon, Oct 18, 2010 at 02:04, Grant Likely wrote: > On Sun, Oct 17, 2010 at 06:59:27PM -0400, Mike Frysinger wrote: >> Expand the BIT_CTL defines to use the naming convention of the hardware, >> and expand the masks to cover all documented bits. >> >> Si

Re: [Uclinux-dist-devel] [PATCH 11/28] Blackfin SPI: convert struct names to something more logical

2010-10-17 Thread Mike Frysinger
On Mon, Oct 18, 2010 at 02:02, Grant Likely wrote: > On Sun, Oct 17, 2010 at 06:59:24PM -0400, Mike Frysinger wrote: >> -struct driver_data { >> +struct master_data { > > Or better yet, to protect against global collisions, bfin5xx_master perhaps? i'd rather not.

[PATCH 28/28] Blackfin SPI: init early

2010-10-17 Thread Mike Frysinger
-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index bd18214..d17ab37 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -1466,7 +1466,7

[PATCH 26/28] Blackfin SPI: warn when CS is driven by hardware (CPHA=0)

2010-10-17 Thread Mike Frysinger
From: Barry Song When the hardware is controlling the CS, there are some SPI options we are unable to support. So issue a warning in the hopes that the user will change to a SPI mode where we can support things sanely. Signed-off-by: Barry Song Signed-off-by: Mike Frysinger --- drivers/spi

[PATCH 21/28] Blackfin SPI: combine duplicate SPI_CTL read/write logic

2010-10-17 Thread Mike Frysinger
While combining things, also switch to the proper SPI bit define names. This lets us punt the rarely used SPI defines. Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/bfin5xx_spi.h | 68 --- drivers/spi/spi_bfin5xx.c | 40

[PATCH 27/28] Blackfin SPI: check per-transfer bits_per_word

2010-10-17 Thread Mike Frysinger
From: Bob Liu Currently, if the bits_per_word when doing a transfer is not 8bits, we always treat it as 16bits when we should actually be returning an error. Signed-off-by: Bob Liu Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |7 ++- 1 files changed, 6 insertions(+), 1

[PATCH 25/28] Blackfin SPI: cs should be always low when a new transfer begins

2010-10-17 Thread Mike Frysinger
From: Rob Maris Signed-off-by: Rob Maris Signed-off-by: Barry Song Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 550aaf7..7882afc 100644 --- a

[PATCH 23/28] Blackfin SPI: reject unsupported SPI modes

2010-10-17 Thread Mike Frysinger
Who knows what people will try! Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 18b313a..a91e556 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b

[PATCH 24/28] Blackfin SPI: fix typo in comment

2010-10-17 Thread Mike Frysinger
From: Rob Maris Signed-off-by: Rob Maris Signed-off-by: Barry Song Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index a91e556..550aaf7 100644 --- a

[PATCH 20/28] Blackfin SPI: reset ctl_reg bits when setup is run again on a device

2010-10-17 Thread Mike Frysinger
During runtime, the spi setup function may be called multiple times on the same device in order to reconfigure some settings on the fly. When this happens, we need to reset the ctl_reg bits so that changing the mode works as expected. Reported-by: Andy Getzendanner Signed-off-by: Mike Frysinger

[PATCH 22/28] Blackfin SPI: use dma_disable_irq_nosync() in irq handler

2010-10-17 Thread Mike Frysinger
From: Barry Song Using disable_irq() on the IRQ whose handler we are currently executing in can easily lead to a hang. So use the nosync variant here. Signed-off-by: Barry Song Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |2 +- 1 files changed, 1 insertions(+), 1

[PATCH 19/28] Blackfin SPI: push all size checks into the transfer function

2010-10-17 Thread Mike Frysinger
This reduces duplication between the setup/transfer functions and keeps values cached during setup from overriding values changed on a transfer basis (like bits_per_word). Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 57 +++-- 1 files

[PATCH 18/28] Blackfin SPI: use nosync when disabling the IRQ from the IRQ handler

2010-10-17 Thread Mike Frysinger
From: Yi Li Using disable_irq() on the IRQ whose handler we are currently executing in can easily lead to a hang. So use the nosync variant here. Signed-off-by: Yi Li Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions

[PATCH 15/28] Blackfin SPI: redo GPIO CS handling

2010-10-17 Thread Mike Frysinger
ardware CS. If it's above, we treat it as a GPIO CS. This keeps the CS unique as seen by the common code and prevents conflicts. Signed-off-by: Barry Song Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/bfin5xx_spi.h |3 +- drivers/spi/spi_bfin5

[PATCH 17/28] Blackfin SPI: sync hardware state before reprogramming everything

2010-10-17 Thread Mike Frysinger
Song Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index c23ac3b..54f9dbb 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -247,6

[PATCH 09/28] Blackfin SPI: convert queue run state to true/false

2010-10-17 Thread Mike Frysinger
No point in creating our own version of true/false defines when there is already a standard stdbool available to us. Reported-by: David Brownell Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 18 -- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git

[PATCH 16/28] Blackfin SPI: save/restore state when suspending/resuming

2010-10-17 Thread Mike Frysinger
From: Barry Song We can't rely on the SPI_CTL/SPI_FLG registers retaining their state when suspending, so save/restore their entire values. Signed-off-by: Barry Song Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 17 + 1 files changed, 13 insertions(

[PATCH 14/28] Blackfin: SPI: expand SPI bitmasks

2010-10-17 Thread Mike Frysinger
Expand the BIT_CTL defines to use the naming convention of the hardware, and expand the masks to cover all documented bits. Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/bfin5xx_spi.h | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/blackfin

[PATCH 13/28] Blackfin SPI: use the SPI namespaced bit names

2010-10-17 Thread Mike Frysinger
This lets us push the short SPI MMR bit names out of the global namespace. Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index

[PATCH 11/28] Blackfin SPI: convert struct names to something more logical

2010-10-17 Thread Mike Frysinger
The current structure names are a bit confusing as to what they represent, so use better names. Reported-by: David Brownell Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 100 ++-- 1 files changed, 50 insertions(+), 50 deletions(-) diff

[PATCH 12/28] Blackfin SPI: drop extra memory we don't need

2010-10-17 Thread Mike Frysinger
The driver that we based ours on uses a little extra memory behind the normal driver state, but we don't. So drop this useless bit of memory. Reported-by: David Brownell Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |4 ++-- 1 files changed, 2 insertions(+), 2 dele

[PATCH 10/28] Blackfin SPI: convert read/write/duplex funcs to a dedicated ops structure

2010-10-17 Thread Mike Frysinger
Rather than having to look up the same 3 sets of functions at the same time, just use an ops structure so we only need to set one pointer. Reported-by: David Brownell Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 58 1 files

[PATCH 07/28] Blackfin SPI: punt useless null read/write funcs

2010-10-17 Thread Mike Frysinger
The chip ops should always be initialized, so having null fallback functions are useless. Reported-by: David Brownell Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 47 1 files changed, 5 insertions(+), 42 deletions(-) diff --git a

[PATCH 04/28] Blackfin SPI: utilize the SPI interrupt in PIO mode

2010-10-17 Thread Mike Frysinger
: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 235 +++-- 1 files changed, 185 insertions(+), 50 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index b835254..3736c35 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers

[PATCH 01/28] Blackfin SPI: fix resources leakage

2010-10-17 Thread Mike Frysinger
From: Daniel Mack Re-order setup() a bit so we don't leak memory/dma/gpio resources upon errors. Also make sure we don't call kfree() twice on the same object. Signed-off-by: Daniel Mack Signed-off-by: Bryan Wu Signed-off-by: Yi Li Signed-off-by: Mike Frysinger --- d

[PATCH 08/28] Blackfin SPI: fix up some unused/misleading comments

2010-10-17 Thread Mike Frysinger
Reported-by: David Brownell Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 5e07f49..045c82a 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b

[PATCH 03/28] Blackfin SPI: force sane master-mode state at boot

2010-10-17 Thread Mike Frysinger
://blackfin.uclinux.org/gf/tracker/5630 Signed-off-by: Wolfgang Muees Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 61c2ebf..b835254

[PATCH 06/28] Blackfin SPI: drop custom cs_change_per_word support

2010-10-17 Thread Mike Frysinger
As David points out, the cs_change_per_word option isn't standard, nor is anyone actually using it. So punt all of the dead code considering it makes up ~10% of the code size. Reported-by: David Brownell Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/bfin5xx_spi.h |

[PATCH 05/28] Blackfin SPI: fix CS handling

2010-10-17 Thread Mike Frysinger
toggle the Flag Enable bit dynamically when we actually want to control the Flag Value, do this when setting up the device and then only handle toggling of the CS value during runtime. Signed-off-by: Barry Song Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 33

[PATCH 00/28] Blackfin SPI updates for 2.6.36

2010-10-17 Thread Mike Frysinger
rdware (CPHA=0) Bob Liu (1): Blackfin SPI: check per-transfer bits_per_word Daniel Mack (1): Blackfin SPI: fix resources leakage Michael Hennerich (1): Blackfin SPI: init early Mike Frysinger (13): Blackfin SPI: drop custom cs_change_per_word support Blackfin SPI: punt useless n

[PATCH 02/28] Blackfin SPI: work around anomaly 05000119

2010-10-17 Thread Mike Frysinger
From: Sonic Zhang Anomaly 05000119 states that the DMA_RUN bit with peripherals isn't reliable. However, the way the driver is currently written (DMA IRQ callback), we don't need the polling in the first place, so drop it. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger --

Re: [spi-devel-general] [PATCH 1/2] spi/mmc_spi: SPI bus locking API, using mutex

2010-02-17 Thread Mike Frysinger
On Wed, Feb 17, 2010 at 16:07, Grant Likely wrote: > On Wed, Feb 17, 2010 at 1:19 PM, Mike Frysinger wrote: >> On Wed, Feb 17, 2010 at 15:06, Grant Likely wrote: >>> On Wed, Feb 17, 2010 at 12:03 PM, Mike Frysinger wrote: >>>> On Wed, Feb 17, 2010 at 13:17, Ernst S

Re: [spi-devel-general] [PATCH 1/2] spi/mmc_spi: SPI bus locking API, using mutex

2010-02-17 Thread Mike Frysinger
On Wed, Feb 17, 2010 at 15:06, Grant Likely wrote: > On Wed, Feb 17, 2010 at 12:03 PM, Mike Frysinger wrote: >> On Wed, Feb 17, 2010 at 13:17, Ernst Schwab wrote: >>> The current runtime API looks like this: >>> spi_async(struct spi_device*, struct spi_message*); >

Re: [spi-devel-general] [PATCH 1/2] spi/mmc_spi: SPI bus locking API, using mutex

2010-02-17 Thread Mike Frysinger
On Wed, Feb 17, 2010 at 13:17, Ernst Schwab wrote: > The current runtime API looks like this: > spi_async(struct spi_device*, struct spi_message*); > spi_sync(struct spi_device*, struct spi_message*); > > The API needs to be extended to this: > spi_async(struct spi_device*, struct spi_message*) > s

Re: [spi-devel-general] [PATCH 1/5] spi: spi_lock_bus and spi_unlock_bus

2010-02-16 Thread Mike Frysinger
On Tue, Feb 16, 2010 at 23:47, Grant Likely wrote: > On Tue, Feb 16, 2010 at 9:34 PM, Mike Frysinger wrote: >> On Tue, Feb 16, 2010 at 22:48, Grant Likely wrote: >>>> there's nothing Blackfin-specific in the implementation of these >>>> functions.  i think the

Re: [spi-devel-general] [PATCH 1/5] spi: spi_lock_bus and spi_unlock_bus

2010-02-16 Thread Mike Frysinger
On Tue, Feb 16, 2010 at 22:48, Grant Likely wrote: > On Tue, Feb 16, 2010 at 5:07 PM, Mike Frysinger wrote: >> On Tue, Feb 16, 2010 at 15:43, Grant Likely wrote: >>> On Tue, Feb 16, 2010 at 12:57 PM, Ernst Schwab wrote: >>>> From: Yi Li >>>> >>>

Re: [spi-devel-general] [PATCH 1/5] spi: spi_lock_bus and spi_unlock_bus

2010-02-16 Thread Mike Frysinger
On Tue, Feb 16, 2010 at 19:21, Ernst Schwab wrote: > Mike Frysinger wrote: >> this is what i proposed last time, but we havent gotten around to >> implementing it: >> >>  - add a new spi_master flag to spi.h like SPI_MASTER_HALF_DUPLEX -- >> SPI_MASTER_LOCK_BUS

Re: [spi-devel-general] [PATCH 1/5] spi: spi_lock_bus and spi_unlock_bus

2010-02-16 Thread Mike Frysinger
vices that >> share the SPI bus with SPI MMC card. >> >> This patch introduces 2 APIs for SPI bus locking operation. >> >> Signed-off-by: Yi Li >> Signed-off-by: Bryan Wu >> Signed-off-by: Mike Frysinger >> --- >> Andrew: we've posted thes

Re: [spi-devel-general] SPI-ADC

2010-02-13 Thread Mike Frysinger
On Sat, Feb 13, 2010 at 11:51, Jonathan Cameron wrote: > http://blackfin.uclinux.org/gf/project/linux-kernel/scmsvn/ people who like git can always use: http://blackfin.uclinux.org/git/?p=readonly-mirrors/linux-kernel.git;a=summary -mike ---

Re: [spi-devel-general] [Uclinux-dist-devel] [PATCH] Clear control bits in drivers/spi/spi_bfin5xx.c as necessary

2010-01-19 Thread Mike Frysinger
On Tue, Jan 19, 2010 at 11:12, Grant Likely wrote: > On Fri, Dec 18, 2009 at 10:34 AM, Mike Frysinger wrote: >> On Fri, Dec 18, 2009 at 08:14, Mike Frysinger wrote: >>> On Fri, Dec 18, 2009 at 02:29, James Getzendanner wrote: >>>> From: Andy Getzendanner

Re: [spi-devel-general] [Uclinux-dist-devel] [PATCH] Clear control bits in drivers/spi/spi_bfin5xx.c as necessary

2009-12-18 Thread Mike Frysinger
On Fri, Dec 18, 2009 at 08:14, Mike Frysinger wrote: > On Fri, Dec 18, 2009 at 02:29, James Getzendanner wrote: >> From: Andy Getzendanner >> The patch also modifies bfin_spi_setup() to >> set/clear the SIZE bit as appropriate. > > ok, but this isnt the place to do it.

Re: [spi-devel-general] [Uclinux-dist-devel] [PATCH] Clear control bits in drivers/spi/spi_bfin5xx.c as necessary

2009-12-18 Thread Mike Frysinger
On Fri, Dec 18, 2009 at 02:29, James Getzendanner wrote: > From: Andy Getzendanner > > This patch corrects the behavior of bfin_spi_setup() to clear bits LSBF, > CPHA, and CPOL in the SPI control register when required by the desired > SPI configuration. why not always zero out ctl_reg then i

Re: [spi-devel-general] [PATCH 1/2] spi: new SPI bus lock/unlockfunctions

2009-12-16 Thread Mike Frysinger
On Wed, Dec 16, 2009 at 17:49, H Hartley Sweeten wrote: > On Thursday, September 17, 2009 3:03 PM, Mike Frysinger wrote: >> >> From: Yi Li >> >> For some MMC cards over SPI bus, it needs to lock the SPI bus for its own >> use.  The SPI transfer must not be inte

Re: [spi-devel-general] spi_set_drvdata() handling in spidev_probe()

2009-12-10 Thread Mike Frysinger
On Thu, Dec 10, 2009 at 21:25, David Brownell wrote: > On Monday 12 October 2009, Mike Frysinger wrote: >> i was browsing the change history of spidev when i noticed the change: >> aaacf4bb51b243875b203e6ff73b5047636b4efa spi: avoid spidev crash when >> device is removed &g

Re: [spi-devel-general] [PATCH 20/38] move spidev_remove to .devexit.text

2009-11-24 Thread Mike Frysinger
2009/11/24 Uwe Kleine-König > The function spidev_remove is used only wrapped by __devexit_p so define > it using __devexit. this doesnt go far enough to address actual section mismatch issues in the driver. i posted a more complete one here: http://lkml.org/lkml/2009/10/13/76 and akpm has picke

[spi-devel-general] [PATCH] spidev: add proper section markers

2009-10-13 Thread Mike Frysinger
The driver already uses __devexit_p() in the structure, but looks like actual __dev{init,exit} markings were forgotten. The spidev_spi driver also needs renaming to include a "_driver" suffix to avoid section mismatch warnings. Signed-off-by: Mike Frysinger --- drivers/spi/spide

[spi-devel-general] spi_set_drvdata() handling in spidev_probe()

2009-10-13 Thread Mike Frysinger
i was browsing the change history of spidev when i noticed the change: aaacf4bb51b243875b203e6ff73b5047636b4efa spi: avoid spidev crash when device is removed which seems to be due to this change: 3d81252ddb10f63ae4db713d9b32faabe641b850 device create: spi: convert device_create to device_create_d

Re: [spi-devel-general] [Uclinux-dist-devel] [PATCH 5/5] Blackfin SPI: clean up error handling in client setup

2009-09-30 Thread Mike Frysinger
On Thu, Sep 17, 2009 at 19:47, Mike Frysinger wrote: > From: Yi Li > > Make sure we don't leak peripheral/gpio resources when an error occurs > during setup, and make sure we don't call kfree() twice on the same > object.  Also add/fix some error messages in the pro

Re: [spi-devel-general] [PATCH 1/2] spi: new SPI bus lock/unlock functions

2009-09-22 Thread Mike Frysinger
On Thu, Sep 17, 2009 at 18:03, Mike Frysinger wrote: > --- a/drivers/spi/spi.c > +++ b/drivers/spi/spi.c > @@ -653,6 +653,54 @@ static void spi_complete(void *arg) > +int spi_lock_bus(struct spi_device *spi) > +{ > +       if (spi->master->lock_bus) > +               r

Re: [spi-devel-general] [PATCH 1/2] spi: new SPI bus lock/unlock functions

2009-09-21 Thread Mike Frysinger
On Mon, Sep 21, 2009 at 02:33, Li Yi wrote: > On Fri, 2009-09-18 at 14:29 -0700, Andrew Morton wrote: >> On Thu, 17 Sep 2009 18:03:16 -0400 >> Mike Frysinger wrote: >> >> > From: Yi Li >> > >> > For some MMC cards over SPI bus, it needs to lock the

Re: [spi-devel-general] [PATCH 1/2] spi: new SPI bus lock/unlockfunctions

2009-09-19 Thread Mike Frysinger
On Fri, Sep 18, 2009 at 19:00, H Hartley Sweeten wrote: > On Thursday, September 17, 2009 3:54 PM, Mike Frysinger wrote: >>> I assume the spi master driver must supply the {lock/unlock}_bus methods >>> to properly support the locking. >> >> currently, yes.  a comm

[spi-devel-general] [PATCH 2/2 v2] mmc_spi: lock the SPI bus when accessing the card

2009-09-17 Thread Mike Frysinger
ns to provide the required exclusivity. Signed-off-by: Yi Li Signed-off-by: Mike Frysinger --- v2 - drop now unused maybe_count_child as pointed out by H Hartley Sweeten drivers/mmc/host/mmc_spi.c | 41 ++--- 1 files changed, 2 insertions(+), 39 dele

[spi-devel-general] [PATCH 3/5] Blackfin SPI: force sane state at boot

2009-09-17 Thread Mike Frysinger
From: Wolfgang Muees We should make sure the SPI controller is in a sane state in case the boot loader left it in a crappy state. Such as DMA pending which causes interrupts to fire on us. Signed-off-by: Wolfgang Muees Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |6

[spi-devel-general] [PATCH 1/5] Blackfin SPI: fix resources leakage

2009-09-17 Thread Mike Frysinger
From: Daniel Mack Re-order setup() a bit so we don't leak memory/dma/gpio resources upon errors. Signed-off-by: Daniel Mack Signed-off-by: Bryan Wu Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 99 + 1 files change

[spi-devel-general] [PATCH 4/5] Blackfin SPI: utilize the SPI interrupt in PIO mode

2009-09-17 Thread Mike Frysinger
: Mike Frysinger --- drivers/spi/spi_bfin5xx.c | 235 +++-- 1 files changed, 185 insertions(+), 50 deletions(-) diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 3249c5d..a8fc922 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers

[spi-devel-general] [PATCH 5/5] Blackfin SPI: clean up error handling in client setup

2009-09-17 Thread Mike Frysinger
From: Yi Li Make sure we don't leak peripheral/gpio resources when an error occurs during setup, and make sure we don't call kfree() twice on the same object. Also add/fix some error messages in the process. Signed-off-by: Yi Li Signed-off-by: Mike Frysinger --- drivers/spi/spi

[spi-devel-general] [PATCH 2/5] Blackfin SPI: work around anomaly 05000119

2009-09-17 Thread Mike Frysinger
From: Sonic Zhang Anomaly 05000119 states that the DMA_RUN bit with peripherals isn't reliable. However, the way the driver is currently written (DMA IRQ callback), we don't need the polling in the first place, so drop it. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger --

Re: [spi-devel-general] [PATCH 1/2] spi: new SPI bus lock/unlockfunctions

2009-09-17 Thread Mike Frysinger
On Thu, Sep 17, 2009 at 18:45, H Hartley Sweeten wrote: > On Thursday, September 17, 2009 3:03 PM, Mike Frysinger wrote: >> From: Yi Li >> >> For some MMC cards over SPI bus, it needs to lock the SPI bus for its own >> use.  The SPI transfer must not be interrupte

[spi-devel-general] [PATCH 2/2] mmc_spi: lock the SPI bus when accessing the card

2009-09-17 Thread Mike Frysinger
ns to provide the required exclusivity. Signed-off-by: Yi Li Signed-off-by: Mike Frysinger --- drivers/mmc/host/mmc_spi.c | 29 ++--- 1 files changed, 2 insertions(+), 27 deletions(-) diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index a461017..a9

[spi-devel-general] [PATCH 1/2] spi: new SPI bus lock/unlock functions

2009-09-17 Thread Mike Frysinger
: Bryan Wu Signed-off-by: Mike Frysinger --- Andrew: we've posted these in the past with no response. could you pick them up please ? drivers/spi/spi.c | 48 +++ include/linux/spi/spi.h |7 ++ 2 files changed, 55 insertions(

Re: [spi-devel-general] [Uclinux-dist-devel] [PATCH 2/2] add ad714x input driverforbutton/scrollwhell/slider/touchpad

2009-09-02 Thread Mike Frysinger
On Wed, Sep 2, 2009 at 05:50, Robin Getz wrote: > On Tue 1 Sep 2009 23:17, Song, Barry pondered: >> No. I can't agree other coding style issues you said. I will keep my >> original codes for these issues except adding a BUS_SPI. > > style is different than performance > > Did you think about Mi

Re: [spi-devel-general] [Uclinux-dist-devel] [PATCH 2/2] add ad714x input driver forbutton/scrollwhell/slider/touchpad

2009-09-01 Thread Mike Frysinger
On Tue, Sep 1, 2009 at 22:46, Song, Barry wrote: >>From: Mike Frysinger >>> +struct ad714x_chip { >>> +       unsigned short h_state; >>> +       unsigned short l_state; >>> +       unsigned short c_state; >>> +       unsigned short adc_reg[STAGE

Re: [spi-devel-general] [Uclinux-dist-devel] [PATCH 2/2] add ad714x input driver for button/scrollwhell/slider/touchpad

2009-09-01 Thread Mike Frysinger
On Mon, Aug 31, 2009 at 23:55, Barry Song wrote: > ad7142/ad7147 are Programmable Controllers for Capacitance Touch Sensors. > The chips don't restrict the specific usage, and it can be used as button/ > slider/scrollwheel/touchpad etc. depending on the hardware connection. > One special target boa

Re: [spi-devel-general] [Uclinux-dist-devel] [PATCH 1/2] add ad714x platform_data definition

2009-09-01 Thread Mike Frysinger
On Mon, Aug 31, 2009 at 23:55, Barry Song<21cn...@gmail.com> wrote: > --- /dev/null > +++ b/include/linux/spi/ad714x.h > @@ -0,0 +1,60 @@ > +/* > + * include/linux/ad714x.h > + * > + * AD714x is very flexible, it can be used as buttons, scrollwheel, > + * slider, touchpad at the same time. That dep

Re: [spi-devel-general] [Uclinux-dist-devel] [PATCH 0/2] add ad714x captouch sensor input driver

2009-09-01 Thread Mike Frysinger
On Mon, Aug 31, 2009 at 23:55, Barry Song wrote: > David, > The patch[1/2] adds a file with platform_data definition for AD714x in > include/linux/spi, > which describes the components layout on special target boards and need be > filled in > arch/mach. i dont think this needs to split merged be

[spi-devel-general] [PATCH 2/3] Blackfin SPI: force sane state at boot

2009-06-02 Thread Mike Frysinger
From: Wolfgang Muees We should make sure the SPI controller is in a sane state in case the boot loader left it in a crappy state. Such as DMA pending which causes interrupts to fire on us. Signed-off-by: Wolfgang Muees Signed-off-by: Mike Frysinger --- drivers/spi/spi_bfin5xx.c |6

[spi-devel-general] [PATCH 3/3] Blackfin SPI: work around anomaly 05000119

2009-06-02 Thread Mike Frysinger
From: Sonic Zhang Anomaly 05000119 states that the DMA_RUN bit with peripherals isn't reliable. However, the way the driver is currently written (DMA IRQ callback), we don't need the polling in the first place, so drop it. Signed-off-by: Sonic Zhang Signed-off-by: Mike Frysinger --

[spi-devel-general] [PATCH 1/3] Blackfin SPI: fix resources leakage

2009-06-02 Thread Mike Frysinger
From: Daniel Mack Re-order setup() a bit so we don't leak memory/dma/gpio resources upon errors. Signed-off-by: Daniel Mack Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- drivers/spi/spi_bfin5xx.c | 101 + 1 files change

  1   2   >