Re: [PATCH v2 1/1] i2c:OMAP3:Errata workaround for spurious RDR event

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

 



Ulrik Bech Hald <ubh@xxxxxx> writes:

> Under certain rare conditions, I2C_STAT[13].RDR bit may be set,
> and the corresponding interrupt fire, even when there is no
> data in the receive FIFO, or the I2C data transfer is still
> ongoing. These spurious RDR events must be ignored by the
> software.
>
> A check for OMAP_I2C_STAT_BB is introduced in the ISR to
> prevent further processing of RDR interrupt, if the bus is busy.
>
> Signed-off-by: Ulrik Bech Hald <ubh@xxxxxx>
> Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@xxxxxx>

Minor CodingStyle comments below...

> ---
>  drivers/i2c/busses/i2c-omap.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index ece0125..88feea1 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -668,6 +668,15 @@ omap_i2c_isr(int this_irq, void *dev_id)
>  			omap_i2c_complete_cmd(dev, err);
>  		if (stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) {
>  			u8 num_bytes = 1;

But the local variable define here, followed by a blank line, and
the assignment to zero is unnecessary.

> +			/* 3430 I2C Errata 1.15
> +			 * RDR could be set when the bus is busy, then
> +			 * ignore the interrupt, and clear the bit.
> +			 */

Move the '*/' to the end of the previous line. 

> +			u8 stat2 = 0;
> +			stat2 = omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG);
> +			if (stat2 & OMAP_I2C_STAT_BB)
> +				return IRQ_HANDLED;
> +
>  			if (dev->fifo_size) {
>  				if (stat & OMAP_I2C_STAT_RRDY)
>  					num_bytes = dev->fifo_size;
> -- 
> 1.5.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux