
Wolfgang Denk wd@denx.de wrote:
In message Pine.LNX.4.64.0805081824310.5839@axis700.grange you wrote:
Of course, your solution will work with multiple, different SPI controllers while mine won't, but is that really necessary?
Your solution comes with more error checking as well, which might be a good thing, but since it comes with a cost of additional memory and flash footprint, I think it should be optional. Maybe we could provide some library functions to simplify the drivers that want this?
I see. Well, I don't have a strong preference. So, either we need more votes, or the one who implements it decides:-)
That was two pros - did I miss any cons ?
Simplicity, flash and RAM footprint. Also, you missed my question: "is that really necessary?". If it is, we should probably take the extra effort to support it. If it isn't, we should keep the code simple.
So is it necessary? It's only a pro if it is actually useful to someone.
As for error handling, we can add a small, optional SPI slave registry library which can be used to debug new SPI slave drivers, but that may be turned off on stable systems to save a bit of flash and RAM.
But my main argument is that we should keep everything simple enough so that we don't _need_ any mandatory mid-layer.
Haavard