All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/3] hw/i2c-ddc: Do not fail writes
@ 2018-02-17 14:00 Linus Walleij
  2018-02-17 14:00 ` [Qemu-devel] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII9022 Linus Walleij
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Linus Walleij @ 2018-02-17 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-arm, Linus Walleij

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.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 hw/i2c/i2c-ddc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/i2c/i2c-ddc.c b/hw/i2c/i2c-ddc.c
index 199dac9e41c1..bec0c91e2dd0 100644
--- a/hw/i2c/i2c-ddc.c
+++ b/hw/i2c/i2c-ddc.c
@@ -259,12 +259,12 @@ static int i2c_ddc_tx(I2CSlave *i2c, uint8_t data)
         s->reg = data;
         s->firstbyte = false;
         DPRINTF("[EDID] Written new pointer: %u\n", data);
-        return 1;
+        return 0;
     }
 
     /* Ignore all writes */
     s->reg++;
-    return 1;
+    return 0;
 }
 
 static void i2c_ddc_init(Object *obj)
-- 
2.14.3

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

end of thread, other threads:[~2018-02-27 10:29 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-17 14:00 [Qemu-devel] [PATCH 1/3] hw/i2c-ddc: Do not fail writes Linus Walleij
2018-02-17 14:00 ` [Qemu-devel] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII9022 Linus Walleij
2018-02-17 18:32   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-02-27  7:41     ` Linus Walleij
2018-02-27 10:09       ` Peter Maydell
2018-02-27 10:21         ` Linus Walleij
2018-02-27 10:24           ` Peter Maydell
2018-02-27 10:29             ` Peter Maydell
2018-02-22 14:42   ` Peter Maydell
2018-02-17 14:00 ` [Qemu-devel] [PATCH 3/3] arm/vexpress: Add proper display connector emulation Linus Walleij
2018-02-17 18:28   ` Philippe Mathieu-Daudé
2018-02-19 14:10     ` Linus Walleij
2018-02-19 15:16       ` Corey Minyard
2018-02-19 15:20       ` [Qemu-devel] [PATCH 0/2] Move the bus class to i2c.h minyard
2018-02-19 15:20         ` [Qemu-devel] [PATCH 1/2] i2c: Fix some brace style issues minyard
2018-02-19 15:24           ` Peter Maydell
2018-02-22 15:37           ` Linus Walleij
2018-02-19 15:20         ` [Qemu-devel] [PATCH 2/2] i2c: Move the bus class to i2c.h minyard
2018-02-19 15:25           ` Peter Maydell
2018-02-20 13:06             ` Corey Minyard
2018-02-22 15:39               ` Linus Walleij
2018-02-22 15:44                 ` Peter Maydell
2018-02-22 15:55                   ` Linus Walleij
2018-02-22 15:38           ` Linus Walleij
2018-02-22 14:36 ` [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/i2c-ddc: Do not fail writes Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.