Re: [PATCH v2] i2c: imx: Add arbitration lost check

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

 



On Wed, Sep 03, 2014 at 01:52:07PM +0800, Haibo Chen wrote:
> According to the i.mx spec, for multimaster mode, if I2C is
> enabled when the bus is busy and asserts start, hardware inhibits
> the transmission, clears MSTA without signaling a stop, generate
> an interrupt, and set I2C_I2SR[IAL] to indicate a failed attempt
> to engage the bus, which means arbitration lost. In this case,
> we should first test I2C_I2SR[IAL], and clear this bit if it is
> set, and then I2C controller default to slave receive mode.
> 
> This patch check the IAL bit every time before an I2c transmission.
> if IAL is set, clear it and make I2C controller to default mode.
> 
> Signed-off-by: Haibo Chen <haibo.chen@xxxxxxxxxxxxx>
> Acked-by: Fugang Duan <B38611@xxxxxxxxxxxxx>
> ---
> Changes for V2:
> -Use 'EAGAIN' instead of 'EIO' for arbitration lost
> -Modify the comment style
> 
>  drivers/i2c/busses/i2c-imx.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index 613069b..ceff87c 100644

Applied to for-next, thanks!

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux