]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7676): saa7134: fix: Properly handle busy states on i2c bus
authorDmitry Belimov <d.belimov@gmail.com>
Wed, 23 Apr 2008 17:07:09 +0000 (14:07 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:09:46 +0000 (14:09 -0300)
There are two conditions, reported by saa7134 that indicates that the I2C bus
is busy: TO_SCL and TO_ARB.

On both states, it needs to wait for I2C release, before using the bus.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/saa7134/saa7134-i2c.c

index ba71dd0040be0fca31551b5077052f9eaf2fd5a6..2ccfaba0c490bfc6d42da43722a8ab6f665d42c9 100644 (file)
@@ -140,6 +140,8 @@ static inline int i2c_is_busy(enum i2c_status status)
 {
        switch (status) {
        case BUSY:
+       case TO_SCL:
+       case TO_ARB:
                return true;
        default:
                return false;