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

2010-02-24 Thread Grant Likely
On Wed, Feb 17, 2010 at 2:41 PM, Mike Frysinger wrote: > On Wed, Feb 17, 2010 at 16:07, Grant Likely wrote: >> Also, even if I agreed with the premise that a cookie is needed for >> deciding who can use the bus when locked, it is still a good idea to >> use a different API when working with a lock

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 Schwab wrote: > The current run

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

2010-02-17 Thread Grant Likely
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 Schwab wrote: The current runtime API looks like this: spi_async(struct spi_devi

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*); >>> spi_sync(struct spi_device*, st

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

2010-02-17 Thread Grant Likely
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*); >> spi_sync(struct spi_device*, struct spi_message*); >> >> The API needs to be extended t

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

2010-02-17 Thread Grant Likely
On Wed, Feb 17, 2010 at 11:17 AM, Ernst Schwab wrote: > From: Ernst Schwab > > SPI bus locking API to allow exclusive access to the SPI bus, especially, but > not limited to, for the mmc_spi driver. > > Coded according to an outline from Grant Likely; here is his > specification (accidentally swa

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

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

2010-02-17 Thread Ernst Schwab
From: Ernst Schwab SPI bus locking API to allow exclusive access to the SPI bus, especially, but not limited to, for the mmc_spi driver. Coded according to an outline from Grant Likely; here is his specification (accidentally swapped function names corrected): It requires 3 things to be added t