Re: [PATCH] i2c: fix missing handling of errata I2C_OMAP3_1P153

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

 



On Monday 06 February 2012 08:03 PM, tasskjapp@xxxxxxxxx wrote:
> From: Tasslehoff Kjappfot <tasskjapp@xxxxxxxxx>
>
> i2c_prope set the dev->errata flag, but omap_i2c_init cleared the flag again. Move the errata handling to i2c_init.
>
 also in my opinion moving the reset to 0 should be moved to probe.
also you may want to cc linux-i2c for the driver patches.
> Signed-off-by: Tasslehoff Kjappfot <tasskjapp@xxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-omap.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 801df60..ecaa60d 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -473,6 +473,10 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
>  	if (dev->flags & OMAP_I2C_FLAG_APPLY_ERRATA_I207)
>  		dev->errata |= I2C_OMAP_ERRATA_I207;
>  
> +	if (dev->rev <= OMAP_I2C_REV_ON_3430)
> +		dev->errata |= I2C_OMAP3_1P153;
> +
> +
>  	/* Enable interrupts */
>  	dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY |
>  			OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK |
> @@ -1058,9 +1062,6 @@ omap_i2c_probe(struct platform_device *pdev)
>  
>  	dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff;
>  
> -	if (dev->rev <= OMAP_I2C_REV_ON_3430)
> -		dev->errata |= I2C_OMAP3_1P153;
> -
>  	if (!(dev->flags & OMAP_I2C_FLAG_NO_FIFO)) {
>  		u16 s;
>  

--
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