[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/5] hw/i2c-ddc: Do not fail writes
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH 3/5] hw/i2c-ddc: Do not fail writes |
Date: |
Tue, 27 Feb 2018 20:38:18 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/27/2018 07:49 AM, Linus Walleij wrote:
> 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 <address@hidden>
> Signed-off-by: Linus Walleij <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> 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)
>
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/5] Versatile Express SiI9022 emulation, Linus Walleij, 2018/02/27
- [Qemu-devel] [PATCH 3/5] hw/i2c-ddc: Do not fail writes, Linus Walleij, 2018/02/27
- Re: [Qemu-devel] [PATCH 3/5] hw/i2c-ddc: Do not fail writes,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 1/5] i2c: Fix some brace style issues, Linus Walleij, 2018/02/27
- [Qemu-devel] [PATCH 2/5] i2c: Move the bus class to i2c.h, Linus Walleij, 2018/02/27
- [Qemu-devel] [PATCH 5/5] arm/vexpress: Add proper display connector emulation, Linus Walleij, 2018/02/27
- [Qemu-devel] [PATCH 4/5] hw/sii9022: Add support for Silicon Image SII9022, Linus Walleij, 2018/02/27
- Re: [Qemu-devel] [PATCH 0/5] Versatile Express SiI9022 emulation, Peter Maydell, 2018/02/27