ssi: Implemented CS behaviour

Added default CS behaviour for SSI slaves. SSI devices can set a property
to enable CS behaviour which will create a GPIO on the device which is the
CS. Tristating of the bus on SSI transfers is implemented.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter A. G. Crosthwaite 2012-07-24 12:23:22 +10:00 committed by Peter Crosthwaite
parent b4a76e84f4
commit 6653095331
9 changed files with 118 additions and 16 deletions

View file

@ -119,11 +119,12 @@ static int ads7856_post_load(void *opaque, int version_id)
static const VMStateDescription vmstate_ads7846 = {
.name = "ads7846",
.version_id = 0,
.minimum_version_id = 0,
.minimum_version_id_old = 0,
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.post_load = ads7856_post_load,
.fields = (VMStateField[]) {
VMSTATE_SSI_SLAVE(ssidev, ADS7846State),
VMSTATE_INT32_ARRAY(input, ADS7846State, 8),
VMSTATE_INT32(noise, ADS7846State),
VMSTATE_INT32(cycle, ADS7846State),