qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V2 1/3] exynos4210: add Exynos4210 i2c implement


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH V2 1/3] exynos4210: add Exynos4210 i2c implementation
Date: Wed, 21 Mar 2012 14:24:53 +0000

On 21 March 2012 14:18, Igor Mitsyanko <address@hidden> wrote:
> Do you mean we shouldn't register EXYNOS4_I2C_SLAVE at all so some
> hypothetical bus master wouldn't even find EXYNOS4_I2C_SLAVE on a bus?
> Maybe the best solution is to make exynos4210_i2c_slave_send() and
> exynos4210_i2c_slave_recv() always return -1, so a hypothetical bus master
> will treat EXYNOS4_I2C_SLAVE as a broken device. But that seems to behave
> exactly like "not register at all" approach..
> And are we really sure that slave interface wouldn't work correctly in a
> current implementation? For example, emulated Exynos CPU issues some command
> to a device A on SPI line and device A in turn issues data on i2c line
> connected to Exynos i2c controller configured as slave. EXYNOS4_I2C_SLAVE
> receives a data and raises interrupt flag.

If there's a valid configuration that works in the existing code
where we can end up receiving data correctly to the EXYNOS4_I2C_SLAVE
from some other device on the i2c bus, that's fine: we can test that
the code you have works OK.

If there is no valid configuration that will do that (because we
don't have any support for any other device being a bus master)
then the code is completely useless, untested and untestable and
we shouldn't put it in.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]