From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF7nJ-0003CC-P7 for qemu-devel@nongnu.org; Tue, 03 Apr 2012 13:45:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SF7nD-0005rx-1F for qemu-devel@nongnu.org; Tue, 03 Apr 2012 13:45:25 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:65162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF7nC-0005rR-RW for qemu-devel@nongnu.org; Tue, 03 Apr 2012 13:45:18 -0400 From: Paul Brook Date: Tue, 3 Apr 2012 18:45:09 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Message-Id: <201204031845.09827.paul@codesourcery.com> Subject: Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Maydell , qemu-devel@nongnu.org, john.williams@petalogix.com, edgar.iglesias@gmail.com > > I'm no SPI expert, but a bit of googling suggests that it's > > a synchronous duplex bus, so you always send a byte of data > > to the slave and get one back in return (even if for some slaves > > it might be random garbage). Waitaminute. So this is just basic synchronous serial? We already have an API for this. hw/spi.c. If you're building higer level protocols they should be layered on top of the SPI, same as smbus is a protocol layer on top of I2C. Paul