ARM:LPC32XX: I2C Clock disable fix
authorBangaragiri G <bangaragiri.g@nxp.com>
Wed, 16 Mar 2011 06:35:44 +0000 (11:35 +0530)
committerBangaragiri G <bangaragiri.g@nxp.com>
Wed, 16 Mar 2011 06:35:44 +0000 (11:35 +0530)
After the I2C initialisation is completed, I2C register access
clock needs to be disabled in i2c_probe function. But I2C register
clock is getting enabled. This patch fixes this issue.

Signed-off-by: Bangaragiri G <bangaragiri.g@nxp.com>

drivers/i2c/busses/i2c-pnx.c

index 5c8899e..d7e792f 100644 (file)
@@ -912,7 +912,7 @@ static int i2c_pnx_smbus_xfer(struct i2c_adapter *adapter,
                iowrite32(ioread32(I2C_REG_CTL(smbus)) | mcntrl_reset,
                          I2C_REG_CTL(smbus));
        }
-       
+
        clk_disable(smbus->clk);
 
        return err;
@@ -1045,7 +1045,7 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev)
               alg_data->adapter.name, i2c_pnx->base, i2c_pnx->irq);
 
        /* Disable clock until needed */
-       clk_enable(alg_data->clk);
+       clk_disable(alg_data->clk);
 
        return 0;