linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6-git 0/4] SPI core refresh
@ 2005-12-12 15:20 Vitaly Wool
  2005-12-12 15:22 ` [PATCH 2.6-git 1/4] SPI core refresh: SPI core patch Vitaly Wool
                   ` (5 more replies)
  0 siblings, 6 replies; 63+ messages in thread
From: Vitaly Wool @ 2005-12-12 15:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Brownell, dpervushin, akpm, greg, basicmark,
	komal_shah802003, stephen, spi-devel-general, Joachim_Jaeger

Greetings,

this message fill be followed by the following four ones:
1) updated SPI core from Dmitry Pervushin/Vitaly Wool
2) Atmel MTD dataflash driver port for this core
3) SPI controller driver for Philips SPI controller
4) dumb EEPROM driver for EEPROM chip on SPI bus

This SPI core features:
* multiple SPI controller support
* multiple devices on the same bus support
* DMA support
* synchronous and asynchronous transfers
* library for asynchronous transfers on the bus using kernel threads
* character device interface
* custom lightweight SPI message allocation mechanism

The SPI core is now closer to the other one, David Brownell's. For instance, spi_driver structure is now the same, and some API functions are mostly quite similar. Even the footprint is now similar (~2k .text on ARM) :)

However, there are some differences I'd like to summarize:
* this core doesn't support hotplug, and David's does (we'll post this support later in a separate patch)
* our core is transparent for DMA transfers (allocation of DMA-safe buffer is triggered by the message flag set by the caller) and David's one implies limitations on tx/rx buffers passed (which can be easily resolved in the controller driver though)
* our core implements thread-based asynchronous message handling (as an option!) which seems to be the best way to go for most cases. i. e. PXA SSP driver from Stephen would be a lot more lightweight and will gain more performance if it used this method instead of multiple tasklets scheduling (as of now)
* our core hides the SPI message internals and David's exposes them to the outer world. This is in way more robust since the only way to allocate the message is through the API
* our core uses uniform message structure for all transfers and "chains" such messages, and David's uses separate spi_transfer array which hold the chain and is attached to the message structure. It's arguable which one is better; at least ours allows to easily change the message inetrnals w/o affecting actual drivers and use versatile message allocation techniques
* our core allows to omit callbacks for sync transfers which is a reasonable thing IMO (if it's a sync transfer, then the caller will just wait, so having a default callback that just waits-for-completion is rational)
* our core provides more straightfoward means (leading to improved readability of the actual drivers) to express the same things, i. e instead of
>	message->status = -EIO;
>	if (message->complete) {
>		message->complete(message->context);
>	}
one is only to do
>	spimsg_complete(message, -EIO);
or, instead of
>		if (!message->transfers[state->index].cs_change)
>			state->cs_control(PXA2XX_CS_DEASSERT);
one is to do
>		if (spimsg_get_flags(cur_msg) & SPI_M_CSKEEP)
>			state->cs_control(PXA2XX_CS_DEASSERT);
* other minor differences... maybe David's gonna add some here.

Vitaly

^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2005-12-23  0:19 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 15:20 [PATCH 2.6-git 0/4] SPI core refresh Vitaly Wool
2005-12-12 15:22 ` [PATCH 2.6-git 1/4] SPI core refresh: SPI core patch Vitaly Wool
2005-12-12 15:49   ` Russell King
2005-12-12 15:24 ` [PATCH 2.6-git 2/4] SPI core refresh: MTD dataflash driver Vitaly Wool
2005-12-12 15:26 ` [PATCH 2.6-git 3/4] SPI core refresh: SPI/PNX controller Vitaly Wool
2005-12-12 15:27 ` [PATCH 2.6-git 4/4] SPI core refresh: dumb EEPROM driver Vitaly Wool
2005-12-12 18:01 ` [PATCH 2.6-git 0/4] SPI core refresh Rui Sousa
2005-12-13 12:09   ` [spi-devel-general] " dmitry pervushin
2005-12-13 15:11     ` Rui Sousa
2005-12-13 17:06       ` dmitry pervushin
2005-12-14  6:57       ` Vitaly Wool
2005-12-14 14:28         ` Rui Sousa
2005-12-13 16:35     ` David Brownell
2005-12-13 18:02       ` Rui Sousa
2005-12-13 14:06 ` [PATCH/RFC] SPI: add async message handing library to David Brownell's core Vitaly Wool
2005-12-13 16:53   ` [PATCH/RFC] SPI: add DMAUNSAFE analog " Vitaly Wool
2005-12-13 19:01     ` David Brownell
2005-12-13 19:15       ` Greg KH
2005-12-14 13:50         ` Vitaly Wool
2005-12-14 17:18           ` Greg KH
2005-12-14 17:53             ` Vitaly Wool
2005-12-14 18:50               ` [PATCH/RFC] SPI: add DMAUNSAFE analog David Brownell
2005-12-14 19:29                 ` Vitaly Wool
2005-12-14 19:02               ` [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core David Brownell
2005-12-14 19:19                 ` Vitaly Wool
2005-12-14 19:33                   ` [spi-devel-general] Re: [PATCH/RFC] SPI: add DMAUNSAFE analog David Brownell
2005-12-14 19:34                 ` [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core Vitaly Wool
2005-12-15  6:47                 ` Vitaly Wool
2005-12-15 16:44                   ` Greg KH
2005-12-15 22:23                     ` Vitaly Wool
2005-12-15 23:02                       ` Greg KH
2005-12-16  8:37                         ` Vitaly Wool
2005-12-16 17:34                           ` Greg KH
2005-12-16 18:32                             ` [spi-devel-general] Re: [PATCH/RFC] SPI: add DMAUNSAFE analog David Brownell
2005-12-15 20:06                   ` David Brownell
2005-12-15 22:17                     ` Vitaly Wool
2005-12-15 22:33                       ` Greg KH
2005-12-16  3:34                         ` Andy Isaacson
2005-12-16  5:17                           ` Greg KH
2005-12-14 19:16               ` [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core Greg KH
2005-12-14 19:30                 ` Vitaly Wool
2005-12-15 10:00               ` [spi-devel-general] " dmitry pervushin
2005-12-14 17:22           ` David Brownell
2005-12-14 17:50             ` Vitaly Wool
2005-12-14 19:17               ` [PATCH/RFC] SPI: add DMAUNSAFE analog David Brownell
2005-12-14 20:11                 ` Vitaly Wool
2005-12-13 21:47       ` [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core Vitaly Wool
2005-12-13 22:15       ` Vitaly Wool
2005-12-14 16:55         ` David Brownell
2005-12-14 17:23           ` Vitaly Wool
2005-12-14 18:48   ` [PATCH/RFC] SPI: add async message handing library " Stephen Street
2005-12-14 19:41     ` Vitaly Wool
2005-12-14 21:19       ` Stephen Street
2005-12-14 19:31   ` [PATCH/RFC] SPI: add async message handing library David Brownell
2005-12-15 12:19   ` [PATCH/RFC] SPI: async message handing library update Vitaly Wool
2005-12-18 18:59     ` David Brownell
2005-12-19 15:40       ` [spi-devel-general] " dmitry pervushin
2005-12-20  7:23         ` David Brownell
2005-12-20 18:02       ` Vitaly Wool
2005-12-22 17:28         ` David Brownell
2005-12-22 22:10           ` Vitaly Wool
2005-12-22 23:55             ` David Brownell
2005-12-21 13:17       ` Vitaly Wool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).