hw/i2c: only schedule pending master when bus is idle
commit791cb95f23045f2d69364786edf61d289889199d
authorKlaus Jensen <k.jensen@samsung.com>
Thu, 2 Mar 2023 12:57:50 +0000 (2 13:57 +0100)
committerCédric Le Goater <clg@kaod.org>
Thu, 2 Mar 2023 12:57:50 +0000 (2 13:57 +0100)
tree5182af8a274a8fde5e5c18e5e593a88339fc72aa
parent9b29a468bd0ca6994dc3d347a01af743c8fe76a7
hw/i2c: only schedule pending master when bus is idle

It is not given that the current master will release the bus after a
transfer ends. Only schedule a pending master if the bus is idle.

Fixes: 37fa5ca42623 ("hw/i2c: support multiple masters")
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-Id: <20221116084312.35808-2-its@irrelevant.dk>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/i2c/aspeed_i2c.c
hw/i2c/core.c
include/hw/i2c/i2c.h