qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

hw/i2c-ddc: Do not fail writes

The tx function of the DDC I2C slave emulation was returning 1
on all writes resulting in NACK in the I2C bus. Changing it to
0 makes the DDC I2C work fine with bit-banged I2C such as the
versatile I2C.

I guess it was not affecting whatever I2C controller this was
used with until now, but with the Versatile I2C it surely
does not work.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Message-id: 20180227104903.21353-4-linus.walleij@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

authored by

Linus Walleij and committed by
Peter Maydell
839a2b28 aa88d7ad

+2 -2
+2 -2
hw/i2c/i2c-ddc.c
··· 259 259 s->reg = data; 260 260 s->firstbyte = false; 261 261 DPRINTF("[EDID] Written new pointer: %u\n", data); 262 - return 1; 262 + return 0; 263 263 } 264 264 265 265 /* Ignore all writes */ 266 266 s->reg++; 267 - return 1; 267 + return 0; 268 268 } 269 269 270 270 static void i2c_ddc_init(Object *obj)