i2c-s3c2410.c (accba5f3965d6a9d1bf7c1e1a7995d17e9d521b6) i2c-s3c2410.c (da6801e38b7fba28fbdc0ceae6681d5a261a42a6)
1/* linux/drivers/i2c/busses/i2c-s3c2410.c
2 *
3 * Copyright (C) 2004,2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 I2C Controller
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 493 unchanged lines hidden (view full) ---

502 * this starts an i2c transfer
503*/
504
505static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int num)
506{
507 unsigned long timeout;
508 int ret;
509
1/* linux/drivers/i2c/busses/i2c-s3c2410.c
2 *
3 * Copyright (C) 2004,2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 I2C Controller
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 493 unchanged lines hidden (view full) ---

502 * this starts an i2c transfer
503*/
504
505static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int num)
506{
507 unsigned long timeout;
508 int ret;
509
510 if (!readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN)
510 if (!(readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN))
511 return -EIO;
512
513 ret = s3c24xx_i2c_set_master(i2c);
514 if (ret != 0) {
515 dev_err(i2c->dev, "cannot get bus (error %d)\n", ret);
516 ret = -EAGAIN;
517 goto out;
518 }

--- 534 unchanged lines hidden ---
511 return -EIO;
512
513 ret = s3c24xx_i2c_set_master(i2c);
514 if (ret != 0) {
515 dev_err(i2c->dev, "cannot get bus (error %d)\n", ret);
516 ret = -EAGAIN;
517 goto out;
518 }

--- 534 unchanged lines hidden ---